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:03:16 UTC

svn commit: r1339932 - in /hbase/branches/0.90: CHANGES.txt src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java

Author: jmhsieh
Date: Fri May 18 00:03:15 2012
New Revision: 1339932

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

Modified:
    hbase/branches/0.90/CHANGES.txt
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1339932&r1=1339931&r2=1339932&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Fri May 18 00:03:15 2012
@@ -39,6 +39,7 @@ Release 0.90.7 - Unreleased
    HBASE-5712  Parallelize load of .regioninfo files in diagnostic/repair portion of hbck
    HBASE-3691  Add compressor support for 'snappy', google's compressor
    HBASE-5973  Add ability for potentially long-running IPC calls to abort if client disconnects (backport by David S. Wang)
+   HBASE-6013  Polish sharp edges from CopyTable
 
   NEW FEATURE
    HBASE-5128  [uber hbck] Online automated repair of table integrity and region consistency problems

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java?rev=1339932&r1=1339931&r2=1339932&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java (original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/mapreduce/CopyTable.java Fri May 18 00:03:15 2012
@@ -96,9 +96,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(" new.name     new table's name");
     System.err.println(" peer.adr     Address of the peer cluster given in the format");
     System.err.println("              hbase.zookeeer.quorum:hbase.zookeeper.client.port:zookeeper.znode.parent");
@@ -174,6 +174,9 @@ public class CopyTable {
 
         if (i == args.length-1) {
           tableName = cmd;
+        } else {
+          printUsage("Invalid argument '" + cmd + "'" );
+          return false;
         }
       }
       if (newTableName == null && peerAddress == null) {
@@ -181,6 +184,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());