You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by vj...@apache.org on 2020/08/13 10:15:19 UTC

[hbase] branch branch-2.3 updated: HBASE-24854 Correct the help content of assign and unassign commands in hbase shell

This is an automated email from the ASF dual-hosted git repository.

vjasani pushed a commit to branch branch-2.3
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-2.3 by this push:
     new 6202ee6  HBASE-24854 Correct the help content of assign and unassign commands in hbase shell
6202ee6 is described below

commit 6202ee6b64a308775593546866b070abd5fb99bc
Author: Zheng Wang <18...@qq.com>
AuthorDate: Thu Aug 13 15:31:58 2020 +0530

    HBASE-24854 Correct the help content of assign and unassign commands in hbase shell
    
    Closes #2241
    
    Signed-off-by: Viraj Jasani <vj...@apache.org>
    Signed-off-by: Wellington Chevreuil <wc...@apache.org>
---
 hbase-shell/src/main/ruby/shell/commands/assign.rb   |  6 ++++--
 hbase-shell/src/main/ruby/shell/commands/unassign.rb | 13 ++++++++-----
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/hbase-shell/src/main/ruby/shell/commands/assign.rb b/hbase-shell/src/main/ruby/shell/commands/assign.rb
index da4fc69..769ed78 100644
--- a/hbase-shell/src/main/ruby/shell/commands/assign.rb
+++ b/hbase-shell/src/main/ruby/shell/commands/assign.rb
@@ -22,8 +22,10 @@ module Shell
     class Assign < Command
       def help
         <<-EOF
-Assign a region. Use with caution. If region already assigned,
-this command will do a force reassign. For experts only.
+Assign a region. It could be executed only when region in expected state(CLOSED, OFFLINE).
+In addition, you can use "assigns" command available on HBCK2 tool to skip the state check.
+(For more info on HBCK2: https://github.com/apache/hbase-operator-tools/blob/master/hbase-hbck2/README.md)
+Use with caution. For experts only.
 Examples:
 
   hbase> assign 'REGIONNAME'
diff --git a/hbase-shell/src/main/ruby/shell/commands/unassign.rb b/hbase-shell/src/main/ruby/shell/commands/unassign.rb
index e13e72e..0e6aa61 100644
--- a/hbase-shell/src/main/ruby/shell/commands/unassign.rb
+++ b/hbase-shell/src/main/ruby/shell/commands/unassign.rb
@@ -22,11 +22,14 @@ module Shell
     class Unassign < Command
       def help
         <<-EOF
-Unassign a region. Unassign will close region in current location and then
-reopen it again.  Pass 'true' to force the unassignment ('force' will clear
-all in-memory state in master before the reassign. If results in
-double assignment use hbck -fix to resolve. To be used by experts).
-Use with caution.  For expert use only.  Examples:
+Unassign a region. It could be executed only when region in expected state(OPEN).
+Pass 'true' to force the unassignment ('force' will clear all in-memory state in
+master before the reassign. If results in double assignment use hbck -fix to resolve.
+To be used by experts).
+In addition, you can use "unassigns" command available on HBCK2 tool to skip the state check.
+(For more info on HBCK2: https://github.com/apache/hbase-operator-tools/blob/master/hbase-hbck2/README.md)
+Use with caution. For experts only.
+Examples:
 
   hbase> unassign 'REGIONNAME'
   hbase> unassign 'REGIONNAME', true