hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1463642 - /hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Export.java
Date Tue, 02 Apr 2013 17:44:56 GMT
Author: stack
Date: Tue Apr  2 17:44:56 2013
New Revision: 1463642

URL: http://svn.apache.org/r1463642
Log:
HBASE-8084 Export could be replaced with IdentityTableMapper

Modified:
    hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Export.java

Modified: hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Export.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Export.java?rev=1463642&r1=1463641&r2=1463642&view=diff
==============================================================================
--- hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Export.java
(original)
+++ hbase/branches/0.95/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/Export.java
Tue Apr  2 17:44:56 2013
@@ -56,31 +56,6 @@ public class Export {
   final static String EXPORT_BATCHING = "hbase.export.scanner.batch";
 
   /**
-   * Mapper.
-   */
-  static class Exporter
-  extends TableMapper<ImmutableBytesWritable, Result> {
-    /**
-     * @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);



Mime
View raw message