HBASE-5395 CopyTable needs to use GenericOptionsParser

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1243759 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jean-Daniel Cryans 2012-02-14 01:13:33 +00:00
parent ce3bae0334
commit 37735435ec
1 changed files with 4 additions and 1 deletions

View File

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