hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zg...@apache.org
Subject [2/2] hbase git commit: HBASE-19591 Cleanup the usage of ReplicationAdmin from hbase-shell
Date Fri, 22 Dec 2017 10:38:02 GMT
HBASE-19591 Cleanup the usage of ReplicationAdmin from hbase-shell


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

Branch: refs/heads/branch-2
Commit: 7ff1feeb8563c92dbd2f29dcd0fc9bfc8f1d7d88
Parents: 3a210d5
Author: Guanghao Zhang <zghao@apache.org>
Authored: Fri Dec 22 14:14:10 2017 +0800
Committer: Guanghao Zhang <zghao@apache.org>
Committed: Fri Dec 22 18:36:33 2017 +0800

----------------------------------------------------------------------
 hbase-shell/src/main/ruby/hbase/replication_admin.rb | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/7ff1feeb/hbase-shell/src/main/ruby/hbase/replication_admin.rb
----------------------------------------------------------------------
diff --git a/hbase-shell/src/main/ruby/hbase/replication_admin.rb b/hbase-shell/src/main/ruby/hbase/replication_admin.rb
index 949bf68..f80c547 100644
--- a/hbase-shell/src/main/ruby/hbase/replication_admin.rb
+++ b/hbase-shell/src/main/ruby/hbase/replication_admin.rb
@@ -19,21 +19,19 @@
 
 include Java
 
-java_import org.apache.hadoop.hbase.client.replication.ReplicationAdmin
 java_import org.apache.hadoop.hbase.client.replication.ReplicationPeerConfigUtil
 java_import org.apache.hadoop.hbase.replication.ReplicationPeerConfig
 java_import org.apache.hadoop.hbase.util.Bytes
 java_import org.apache.hadoop.hbase.zookeeper.ZKConfig
 java_import org.apache.hadoop.hbase.TableName
 
-# Wrapper for org.apache.hadoop.hbase.client.replication.ReplicationAdmin
+# Used for replication administrative operations.
 
 module Hbase
   class RepAdmin
     include HBaseConstants
 
     def initialize(configuration)
-      @replication_admin = ReplicationAdmin.new(configuration)
       @configuration = configuration
       @admin = ConnectionFactory.createConnection(configuration).getAdmin
     end
@@ -272,10 +270,10 @@ module Hbase
     end
 
     def set_peer_replicate_all(id, replicate_all)
-      rpc = @replication_admin.getPeerConfig(id)
+      rpc = get_peer_config(id)
       return if rpc.nil?
       rpc.setReplicateAllUserTables(replicate_all)
-      @replication_admin.updatePeerConfig(id, rpc)
+      @admin.updateReplicationPeerConfig(id, rpc)
     end
 
     # Set exclude namespaces config for the specified peer


Mime
View raw message