hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmhs...@apache.org
Subject svn commit: r1339930 - /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
Date Fri, 18 May 2012 00:01:21 GMT
Author: jmhsieh
Date: Fri May 18 00:01:21 2012
New Revision: 1339930

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

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

Modified: hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java?rev=1339930&r1=1339929&r2=1339930&view=diff
==============================================================================
--- hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java (original)
+++ hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java Fri
May 18 00:01:21 2012
@@ -120,9 +120,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");
@@ -216,6 +216,9 @@ public class CopyTable {
 
         if (i == args.length-1) {
           tableName = cmd;
+        } else {
+          printUsage("Invalid argument '" + cmd + "'" );
+          return false;
         }
       }
       if (newTableName == null && peerAddress == null) {
@@ -223,6 +226,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());



Mime
View raw message