You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2013/05/03 22:31:00 UTC

svn commit: r1478964 - /hbase/branches/0.95/bin/hbase

Author: stack
Date: Fri May  3 20:30:47 2013
New Revision: 1478964

URL: http://svn.apache.org/r1478964
Log:
HBASE-7244 Provide a command or argument to startup, that formats znodes if provided

Modified:
    hbase/branches/0.95/bin/hbase

Modified: hbase/branches/0.95/bin/hbase
URL: http://svn.apache.org/viewvc/hbase/branches/0.95/bin/hbase?rev=1478964&r1=1478963&r2=1478964&view=diff
==============================================================================
--- hbase/branches/0.95/bin/hbase (original)
+++ hbase/branches/0.95/bin/hbase Fri May  3 20:30:47 2013
@@ -85,6 +85,7 @@ if [ $# = 0 ]; then
   echo "  rest             run an HBase REST server" 
   echo "  thrift           run the HBase Thrift server" 
   echo "  thrift2          run the HBase Thrift2 server"
+  echo "  clean            run the HBase clean up script"
   echo ""
   echo "PACKAGE MANAGEMENT"
   echo "  classpath        dump hbase CLASSPATH"
@@ -306,6 +307,22 @@ elif [ "$COMMAND" = "zookeeper" ] ; then
   if [ "$1" != "stop" ] ; then
     HBASE_OPTS="$HBASE_OPTS $HBASE_ZOOKEEPER_OPTS"
   fi
+elif [ "$COMMAND" = "clean" ] ; then
+  case $1 in
+    --cleanZk|--cleanHdfs|--cleanAll) 
+      matches="yes" ;;
+    *) ;;
+  esac
+  if [ $# -ne 1 -o "$matches" = "" ]; then
+    echo "Usage: hbase clean (--cleanZk|--cleanHdfs|--cleanAll)"
+    echo "Options: "
+    echo "        --cleanZk   cleans hbase related data from zookeeper."
+    echo "        --cleanHdfs cleans hbase related data from hdfs."
+    echo "        --cleanAll  cleans hbase related data from both zookeeper and hdfs."
+    exit 1;
+  fi
+  "$bin"/hbase-cleanup.sh $@
+  exit $?
 
 elif [ "$COMMAND" = "classpath" ] ; then
   echo $CLASSPATH