HBASE-26398 CellCounter fails for large tables filling up local disk (#3798)
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
This commit is contained in:
parent
45f76a4104
commit
60254bc184
|
@ -216,7 +216,6 @@ public class CellCounter extends Configured implements Tool {
|
||||||
Scan scan = getConfiguredScanForJob(conf, args);
|
Scan scan = getConfiguredScanForJob(conf, args);
|
||||||
TableMapReduceUtil.initTableMapperJob(tableName, scan,
|
TableMapReduceUtil.initTableMapperJob(tableName, scan,
|
||||||
CellCounterMapper.class, ImmutableBytesWritable.class, Result.class, job);
|
CellCounterMapper.class, ImmutableBytesWritable.class, Result.class, job);
|
||||||
job.setNumReduceTasks(1);
|
|
||||||
job.setMapOutputKeyClass(Text.class);
|
job.setMapOutputKeyClass(Text.class);
|
||||||
job.setMapOutputValueClass(IntWritable.class);
|
job.setMapOutputValueClass(IntWritable.class);
|
||||||
job.setOutputFormatClass(TextOutputFormat.class);
|
job.setOutputFormatClass(TextOutputFormat.class);
|
||||||
|
@ -224,6 +223,7 @@ public class CellCounter extends Configured implements Tool {
|
||||||
job.setOutputValueClass(IntWritable.class);
|
job.setOutputValueClass(IntWritable.class);
|
||||||
FileOutputFormat.setOutputPath(job, outputDir);
|
FileOutputFormat.setOutputPath(job, outputDir);
|
||||||
job.setReducerClass(IntSumReducer.class);
|
job.setReducerClass(IntSumReducer.class);
|
||||||
|
job.setCombinerClass(IntSumReducer.class);
|
||||||
return job;
|
return job;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue