diff --git a/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java b/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java index 9e346787b4d..798f22799df 100644 --- a/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java +++ b/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java @@ -25,6 +25,7 @@ import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.mapreduce.Job; +import org.apache.hadoop.util.GenericOptionsParser; import java.io.IOException; import java.util.HashMap; @@ -234,7 +235,9 @@ public class CopyTable { */ public static void main(String[] args) throws Exception { Configuration conf = HBaseConfiguration.create(); - Job job = createSubmittableJob(conf, args); + String[] otherArgs = + new GenericOptionsParser(conf, args).getRemainingArgs(); + Job job = createSubmittableJob(conf, otherArgs); if (job != null) { System.exit(job.waitForCompletion(true) ? 0 : 1); }