You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by sy...@apache.org on 2017/03/20 17:41:45 UTC

[12/28] hbase git commit: HBASE-17758 [RSGROUP] Add shell command to move servers and tables at the same time (Guangxu Cheng) - addendum with move_servers_tables_rsgroup.rb

HBASE-17758 [RSGROUP] Add shell command to move servers and tables at the same time (Guangxu Cheng) - addendum with move_servers_tables_rsgroup.rb


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/8e5eeb4d
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/8e5eeb4d
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/8e5eeb4d

Branch: refs/heads/hbase-12439
Commit: 8e5eeb4db3be14371a38d0d54169a6e5c7b5f983
Parents: 154e58e
Author: tedyu <yu...@gmail.com>
Authored: Fri Mar 17 13:55:36 2017 -0700
Committer: tedyu <yu...@gmail.com>
Committed: Fri Mar 17 13:55:36 2017 -0700

----------------------------------------------------------------------
 .../commands/move_servers_tables_rsgroup.rb     | 37 ++++++++++++++++++++
 1 file changed, 37 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/8e5eeb4d/hbase-shell/src/main/ruby/shell/commands/move_servers_tables_rsgroup.rb
----------------------------------------------------------------------
diff --git a/hbase-shell/src/main/ruby/shell/commands/move_servers_tables_rsgroup.rb b/hbase-shell/src/main/ruby/shell/commands/move_servers_tables_rsgroup.rb
new file mode 100644
index 0000000..5337141
--- /dev/null
+++ b/hbase-shell/src/main/ruby/shell/commands/move_servers_tables_rsgroup.rb
@@ -0,0 +1,37 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+module Shell
+  module Commands
+    class MoveServersTablesRsgroup < Command
+      def help
+        return <<-EOF
+Reassign RegionServers and Tables from one group to another.
+
+Example:
+
+  hbase> move_servers_tables_rsgroup 'dest',['server1:port','server2:port'],['table1','table2']
+
+EOF
+      end
+
+      def command(dest, servers, tables)
+        rsgroup_admin.move_servers_tables(dest, servers, tables)
+      end
+    end
+  end
+end