hadoop - Write Reducer output of a Mapreduce job to a single File -


i have written map-reduce job data in hbase. contains multiple mappers , single reducer. reducer method takes in data supplied mapper , analytic on it. after processing complete data in hbase wanted write data file in hdfs through single reducer. presently able write data hdfs every time new 1 unable figure how write final conclusion hdfs @ last.

so, if trying write final result single reducer hdfs, can try 1 of approaches below -

  1. use hadoop api filesystem's create() function write hdfs reducer.
  2. emit single key , value reducer after final calculation
  3. override reducers cleanup() function , point (1) there.

details on 3:

http://hadoop.apache.org/docs/current/api/org/apache/hadoop/mapreduce/reducer.html#cleanup-org.apache.hadoop.mapreduce.reducer.context-

hope helps.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -