hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1327641 - in /hbase/branches/0.92: CHANGES.txt src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
Date Wed, 18 Apr 2012 19:33:38 GMT
Author: stack
Date: Wed Apr 18 19:33:37 2012
New Revision: 1327641

URL: http://svn.apache.org/viewvc?rev=1327641&view=rev
Log:
HBASE-5823 Hbck should be able to print help

Modified:
    hbase/branches/0.92/CHANGES.txt
    hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java

Modified: hbase/branches/0.92/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/CHANGES.txt?rev=1327641&r1=1327640&r2=1327641&view=diff
==============================================================================
--- hbase/branches/0.92/CHANGES.txt (original)
+++ hbase/branches/0.92/CHANGES.txt Wed Apr 18 19:33:37 2012
@@ -41,6 +41,7 @@ Release 0.92.2 - Unreleased
    HBASE-5781  Zookeeper session got closed while trying to assign the region to RS using
hbck -fix
    HBASE-5793  TestHBaseFsck#TestNoHdfsTable test hangs after client retries increased
    HBASE-5780  Fix race in HBase regionserver startup vs ZK SASL authentication (Shaneal
Manek)
+   HBASE-5823  HBASE-5823 Hbck should be able to print help (Enis Soztutar)
 
   IMPROVEMENTS
    HBASE-5592  Make it easier to get a table from shell (Ben West)

Modified: hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java?rev=1327641&r1=1327640&r2=1327641&view=diff
==============================================================================
--- hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java (original)
+++ hbase/branches/0.92/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java Wed Apr
18 19:33:37 2012
@@ -2885,6 +2885,7 @@ public class HBaseFsck {
   protected static void printUsageAndExit() {
     System.err.println("Usage: fsck [opts] {only tables}");
     System.err.println(" where [opts] are:");
+    System.err.println("   -help Display help options (this)");
     System.err.println("   -details Display full report of all regions.");
     System.err.println("   -timelag {timeInSeconds}  Process only regions that " +
                        " have not experienced any metadata updates in the last " +
@@ -2928,7 +2929,9 @@ public class HBaseFsck {
     // Process command-line args.
     for (int i = 0; i < args.length; i++) {
       String cmd = args[i];
-      if (cmd.equals("-details")) {
+      if (cmd.equals("-help") || cmd.equals("-h")) {
+        printUsageAndExit();
+      } else if (cmd.equals("-details")) {
         fsck.setDisplayFullReport();
       } else if (cmd.equals("-timelag")) {
         if (i == args.length - 1) {
@@ -3021,6 +3024,9 @@ public class HBaseFsck {
         fsck.setSummary();
       } else if (cmd.equals("-metaonly")) {
         fsck.setCheckMetaOnly();
+      } else if (cmd.startsWith("-")) {
+        System.err.println("Unrecognized option:" + cmd);
+        printUsageAndExit();
       } else {
         byte[] table = Bytes.toBytes(cmd);
         fsck.includeTable(table);



Mime
View raw message