You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bu...@apache.org on 2016/03/28 17:47:12 UTC
hbase git commit: Revert "HBASE-15508 Add command for exporting
snapshot in hbase command script (Yufeng Jiang)"
Repository: hbase
Updated Branches:
refs/heads/branch-1.1 347d9b02b -> e959eb36f
Revert "HBASE-15508 Add command for exporting snapshot in hbase command script (Yufeng Jiang)"
This reverts commit 7032c0cb76941b47229b56c00c4637b70630e007.
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/e959eb36
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e959eb36
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e959eb36
Branch: refs/heads/branch-1.1
Commit: e959eb36ffb7feb249294491ba8037fd9a63404b
Parents: 347d9b0
Author: Sean Busbey <bu...@apache.org>
Authored: Mon Mar 28 10:45:55 2016 -0500
Committer: Sean Busbey <bu...@apache.org>
Committed: Mon Mar 28 10:45:55 2016 -0500
----------------------------------------------------------------------
bin/hbase | 33 ++++----------------
.../hadoop/hbase/snapshot/ExportSnapshot.java | 4 +--
.../hadoop/hbase/snapshot/SnapshotInfo.java | 4 +--
3 files changed, 10 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/e959eb36/bin/hbase
----------------------------------------------------------------------
diff --git a/bin/hbase b/bin/hbase
index 4241646..c920f32 100755
--- a/bin/hbase
+++ b/bin/hbase
@@ -71,22 +71,19 @@ if [ -d "${HBASE_HOME}/target" ]; then
in_dev_env=true
fi
-read -d '' options_string << EOF
-Options:
- --config DIR Configuration direction to use. Default: ./conf
- --hosts HOSTS Override the list in 'regionservers' file
- --auth-as-server Authenticate to ZooKeeper using servers configuration
-EOF
# if no args specified, show usage
if [ $# = 0 ]; then
echo "Usage: hbase [<options>] <command> [<args>]"
- echo "$options_string"
+ echo "Options:"
+ echo " --config DIR Configuration direction to use. Default: ./conf"
+ echo " --hosts HOSTS Override the list in 'regionservers' file"
+ echo " --auth-as-server Authenticate to ZooKeeper using servers configuration"
echo ""
echo "Commands:"
echo "Some commands take arguments. Pass no args or -h for usage."
echo " shell Run the HBase shell"
echo " hbck Run the hbase 'fsck' tool"
- echo " snapshot Tool for managing snapshots"
+ echo " snapshot Create a new snapshot of a table"
echo " snapshotinfo Tool for dumping snapshot information"
echo " wal Write-ahead-log analyzer"
echo " hfile Store file analyzer"
@@ -319,26 +316,8 @@ elif [ "$COMMAND" = "zkcli" ] ; then
elif [ "$COMMAND" = "upgrade" ] ; then
CLASS="org.apache.hadoop.hbase.migration.UpgradeTo96"
elif [ "$COMMAND" = "snapshot" ] ; then
- SUBCOMMAND=$1
- shift
- if [ "$SUBCOMMAND" = "create" ] ; then
- CLASS="org.apache.hadoop.hbase.snapshot.CreateSnapshot"
- elif [ "$SUBCOMMAND" = "info" ] ; then
- CLASS="org.apache.hadoop.hbase.snapshot.SnapshotInfo"
- elif [ "$SUBCOMMAND" = "export" ] ; then
- CLASS="org.apache.hadoop.hbase.snapshot.ExportSnapshot"
- else
- echo "Usage: hbase [<options>] snapshot <subcommand> [<args>]"
- echo "$options_string"
- echo ""
- echo "Subcommands:"
- echo " create Create a new snapshot of a table"
- echo " info Tool for dumping snapshot information"
- echo " export Export an existing snapshot"
- exit 1
- fi
+ CLASS="org.apache.hadoop.hbase.snapshot.CreateSnapshot"
elif [ "$COMMAND" = "snapshotinfo" ] ; then
- >&2 echo "'hbase snapshotinfo' is deprecated and will not be available in HBase 2. Please use 'hbase snapshot info' instead."
CLASS="org.apache.hadoop.hbase.snapshot.SnapshotInfo"
elif [ "$COMMAND" = "master" ] ; then
CLASS='org.apache.hadoop.hbase.master.HMaster'
http://git-wip-us.apache.org/repos/asf/hbase/blob/e959eb36/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
index 0701bc3..9d0f760 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/ExportSnapshot.java
@@ -1050,11 +1050,11 @@ public class ExportSnapshot extends Configured implements Tool {
System.err.println(" -bandwidth Limit bandwidth to this value in MB/second.");
System.err.println();
System.err.println("Examples:");
- System.err.println(" hbase snapshot export \\");
+ System.err.println(" hbase " + getClass().getName() + " \\");
System.err.println(" -snapshot MySnapshot -copy-to hdfs://srv2:8082/hbase \\");
System.err.println(" -chuser MyUser -chgroup MyGroup -chmod 700 -mappers 16");
System.err.println();
- System.err.println(" hbase snapshot export \\");
+ System.err.println(" hbase " + getClass().getName() + " \\");
System.err.println(" -snapshot MySnapshot -copy-from hdfs://srv2:8082/hbase \\");
System.err.println(" -copy-to hdfs://srv1:50070/hbase \\");
System.exit(1);
http://git-wip-us.apache.org/repos/asf/hbase/blob/e959eb36/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotInfo.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotInfo.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotInfo.java
index bbe181a..606b9c9 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotInfo.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/snapshot/SnapshotInfo.java
@@ -458,7 +458,7 @@ public final class SnapshotInfo extends Configured implements Tool {
}
private void printUsageAndExit() {
- System.err.printf("Usage: bin/hbase snapshot info [options]%n");
+ System.err.printf("Usage: bin/hbase %s [options]%n", getClass().getName());
System.err.println(" where [options] are:");
System.err.println(" -h|-help Show this help and exit.");
System.err.println(" -remote-dir Root directory that contains the snapshots.");
@@ -470,7 +470,7 @@ public final class SnapshotInfo extends Configured implements Tool {
System.err.println(" -schema Describe the snapshotted table.");
System.err.println();
System.err.println("Examples:");
- System.err.println(" hbase snapshot info \\");
+ System.err.println(" hbase " + getClass() + " \\");
System.err.println(" -snapshot MySnapshot -files");
System.exit(1);
}