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:
Istvan Toth 2021-10-28 10:42:42 +02:00 committed by Wellington Chevreuil
parent f2c58fcf68
commit 7353c281fc
1 changed files with 1 additions and 1 deletions

View File

@ -215,7 +215,6 @@ public class CellCounter extends Configured implements Tool {
Scan scan = getConfiguredScanForJob(conf, args);
TableMapReduceUtil.initTableMapperJob(tableName, scan,
CellCounterMapper.class, ImmutableBytesWritable.class, Result.class, job);
job.setNumReduceTasks(1);
job.setMapOutputKeyClass(Text.class);
job.setMapOutputValueClass(IntWritable.class);
job.setOutputFormatClass(TextOutputFormat.class);
@ -223,6 +222,7 @@ public class CellCounter extends Configured implements Tool {
job.setOutputValueClass(IntWritable.class);
FileOutputFormat.setOutputPath(job, outputDir);
job.setReducerClass(IntSumReducer.class);
job.setCombinerClass(IntSumReducer.class);
return job;
}