You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jm...@apache.org on 2012/05/18 02:01:19 UTC

svn commit: r1339929 - /hbase/trunk/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java

Author: jmhsieh
Date: Fri May 18 00:01:18 2012
New Revision: 1339929

URL: http://svn.apache.org/viewvc?rev=1339929&view=rev
Log:
HBASE-6013 Polish sharp edges from CopyTable

Modified:
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java?rev=1339929&r1=1339928&r2=1339929&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java Fri May 18 00:01:18 2012
@@ -124,9 +124,9 @@ public class CopyTable {
     System.err.println(" rs.class     hbase.regionserver.class of the peer cluster");
     System.err.println("              specify if different from current cluster");
     System.err.println(" rs.impl      hbase.regionserver.impl of the peer cluster");
-    System.err.println(" starttime    beginning of the time range");
+    System.err.println(" starttime    beginning of the time range (unixtime in millis)");
     System.err.println("              without endtime means from starttime to forever");
-    System.err.println(" endtime      end of the time range");
+    System.err.println(" endtime      end of the time range.  Ignored if no starttime specified.");
     System.err.println(" versions     number of cell versions to copy");
     System.err.println(" new.name     new table's name");
     System.err.println(" peer.adr     Address of the peer cluster given in the format");
@@ -220,6 +220,9 @@ public class CopyTable {
 
         if (i == args.length-1) {
           tableName = cmd;
+        } else {
+          printUsage("Invalid argument '" + cmd + "'" );
+          return false;
         }
       }
       if (newTableName == null && peerAddress == null) {
@@ -227,6 +230,10 @@ public class CopyTable {
             "peer address must be specified");
         return false;
       }
+      if (startTime > endTime) {
+        printUsage("Invalid time range filter: starttime=" + startTime + " >  endtime=" + endTime);
+        return false;
+      }
     } catch (Exception e) {
       e.printStackTrace();
       printUsage("Can't start because " + e.getMessage());