In my application, the reducer saves all part files in HDFS, but I want only the reducer to write part files whose size is not 0 bytes. Please let me know how to identify it.
It is possible - see the documentation section on "Lazy Output":
http://hadoop.apache.org/mapreduce/docs/current/mapred_tutorial.html#Lazy+Output+Creation
import org.apache.hadoop.mapreduce.lib.output.LazyOutputFormat; LazyOutputFormat.setOutputFormatClass(job, TextOutputFormat.class);
If you are using the old API, you can use the NullOutputFormat class:
NullOutputFormat
import org.apache.hadoop.mapred.lib.NullOutputFormat; conf.setOutputFormat(NullOutputFormat.class);