HBASE-6013 Polish sharp edges from CopyTable

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1339929 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Hsieh 2012-05-18 00:01:18 +00:00
parent c3fc3f6341
commit fe4e7afdd0
1 changed files with 9 additions and 2 deletions

View File

@ -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());