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 GitHub
parent 45f76a4104
commit 60254bc184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;
} }