From 1f564b6f21fe931b94613d559bec0dd20b5825bc Mon Sep 17 00:00:00 2001 From: Nick Dimiduk Date: Mon, 11 Mar 2013 18:17:59 -0700 Subject: [PATCH] HBASE-7995 Replace Export$Exporter with IdentityTableMapper --- .../org/apache/hadoop/hbase/mapreduce/Export.java | 30 ++-------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Export.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Export.java index df5994a..d87c4fe 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Export.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Export.java @@ -56,31 +56,6 @@ public class Export { final static String EXPORT_BATCHING = "hbase.export.scanner.batch"; /** - * Mapper. - */ - static class Exporter - extends TableMapper { - /** - * @param row The current table row key. - * @param value The columns. - * @param context The current context. - * @throws IOException When something is broken with the data. - * @see org.apache.hadoop.mapreduce.Mapper#map(KEYIN, VALUEIN, - * org.apache.hadoop.mapreduce.Mapper.Context) - */ - @Override - public void map(ImmutableBytesWritable row, Result value, - Context context) - throws IOException { - try { - context.write(row, value); - } catch (InterruptedException e) { - e.printStackTrace(); - } - } - } - - /** * Sets up the actual job. * * @param conf The current configuration. @@ -94,11 +69,10 @@ public class Export { Path outputDir = new Path(args[1]); Job job = new Job(conf, NAME + "_" + tableName); job.setJobName(NAME + "_" + tableName); - job.setJarByClass(Exporter.class); + job.setJarByClass(Export.class); // Set optional scan parameters Scan s = getConfiguredScanForJob(conf, args); - TableMapReduceUtil.initTableMapperJob(tableName, s, Exporter.class, null, - null, job); + IdentityTableMapper.initJob(tableName, s, IdentityTableMapper.class, job); // No reducers. Just write straight to output files. job.setNumReduceTasks(0); job.setOutputFormatClass(SequenceFileOutputFormat.class); -- 1.8.1