[hbase-site] branch asf-site updated: INFRA-10751 Empty commit

2023-10-23 Thread git-site-role
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/asf-site by this push:
 new 4ee1fe8d11f INFRA-10751 Empty commit
4ee1fe8d11f is described below

commit 4ee1fe8d11fdd807ff59c78a3e14d7e25e476311
Author: jenkins 
AuthorDate: Mon Oct 23 14:44:55 2023 +

INFRA-10751 Empty commit



[hbase] branch branch-2.5 updated: HBASE-28146: Make ServerManager rsAdmins map thread safe (#5461)

2023-10-23 Thread zhangduo
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/branch-2.5 by this push:
 new 574fdc2d7a1 HBASE-28146: Make ServerManager rsAdmins map thread safe 
(#5461)
574fdc2d7a1 is described below

commit 574fdc2d7a1fdc1d15ba2c01e1355bc6464be10d
Author: Ray Mattingly 
AuthorDate: Mon Oct 23 05:16:14 2023 -0400

HBASE-28146: Make ServerManager rsAdmins map thread safe (#5461)

Co-authored-by: Ray Mattingly 
Signed-off-by: Duo Zhang 
Signed-off-by: Bryan Beaudreault 
(cherry picked from commit 1641a4abc13c7ad4da216a115107fc772d24d543)
---
 .../apache/hadoop/hbase/master/ServerManager.java  | 26 +-
 1 file changed, 6 insertions(+), 20 deletions(-)

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
index de08332f96e..0f058603c94 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
@@ -23,7 +23,6 @@ import java.io.IOException;
 import java.net.InetAddress;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
@@ -124,12 +123,6 @@ public class ServerManager {
   private final ConcurrentNavigableMap 
onlineServers =
 new ConcurrentSkipListMap<>();
 
-  /**
-   * Map of admin interfaces per registered regionserver; these interfaces we 
use to control
-   * regionservers out on the cluster
-   */
-  private final Map rsAdmins = new 
HashMap<>();
-
   /** List of region servers that should not get any more new regions. */
   private final ArrayList drainingServers = new ArrayList<>();
 
@@ -397,7 +390,6 @@ public class ServerManager {
   void recordNewServerWithLock(final ServerName serverName, final 
ServerMetrics sl) {
 LOG.info("Registering regionserver=" + serverName);
 this.onlineServers.put(serverName, sl);
-this.rsAdmins.remove(serverName);
   }
 
   public RegionStoreSequenceIds getLastFlushedSequenceId(byte[] 
encodedRegionName) {
@@ -599,7 +591,6 @@ public class ServerManager {
 LOG.trace("Expiration of {} but server not online", sn);
   }
 }
-this.rsAdmins.remove(sn);
   }
 
   /*
@@ -711,18 +702,13 @@ public class ServerManager {
* @throws RetriesExhaustedException wrapping a ConnectException if failed
*/
   public AdminService.BlockingInterface getRsAdmin(final ServerName sn) throws 
IOException {
-AdminService.BlockingInterface admin = this.rsAdmins.get(sn);
-if (admin == null) {
-  LOG.debug("New admin connection to " + sn.toString());
-  if (sn.equals(master.getServerName()) && master instanceof 
HRegionServer) {
-// A master is also a region server now, see HBASE-10569 for details
-admin = ((HRegionServer) master).getRSRpcServices();
-  } else {
-admin = this.connection.getAdmin(sn);
-  }
-  this.rsAdmins.put(sn, admin);
+LOG.debug("New admin connection to {}", sn);
+if (sn.equals(master.getServerName()) && master instanceof HRegionServer) {
+  // A master is also a region server now, see HBASE-10569 for details
+  return ((HRegionServer) master).getRSRpcServices();
+} else {
+  return this.connection.getAdmin(sn);
 }
-return admin;
   }
 
   /**



[hbase] branch branch-2.4 updated: HBASE-28146: Make ServerManager rsAdmins map thread safe (#5461)

2023-10-23 Thread zhangduo
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/branch-2.4 by this push:
 new dc5539ce678 HBASE-28146: Make ServerManager rsAdmins map thread safe 
(#5461)
dc5539ce678 is described below

commit dc5539ce6780e81a6859a82918785ad3388fd39d
Author: Ray Mattingly 
AuthorDate: Mon Oct 23 05:16:14 2023 -0400

HBASE-28146: Make ServerManager rsAdmins map thread safe (#5461)

Co-authored-by: Ray Mattingly 
Signed-off-by: Duo Zhang 
Signed-off-by: Bryan Beaudreault 
(cherry picked from commit 1641a4abc13c7ad4da216a115107fc772d24d543)
---
 .../apache/hadoop/hbase/master/ServerManager.java  | 27 ++
 1 file changed, 7 insertions(+), 20 deletions(-)

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
index 98a12e69217..937789266b0 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
@@ -23,7 +23,6 @@ import java.io.IOException;
 import java.net.InetAddress;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
@@ -44,6 +43,7 @@ import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.YouAreDeadException;
 import org.apache.hadoop.hbase.client.ClusterConnection;
 import org.apache.hadoop.hbase.client.RegionInfo;
+import org.apache.hadoop.hbase.client.RetriesExhaustedException;
 import org.apache.hadoop.hbase.ipc.HBaseRpcController;
 import org.apache.hadoop.hbase.ipc.RemoteWithExtrasException;
 import org.apache.hadoop.hbase.ipc.RpcControllerFactory;
@@ -123,12 +123,6 @@ public class ServerManager {
   private final ConcurrentNavigableMap 
onlineServers =
 new ConcurrentSkipListMap<>();
 
-  /**
-   * Map of admin interfaces per registered regionserver; these interfaces we 
use to control
-   * regionservers out on the cluster
-   */
-  private final Map rsAdmins = new 
HashMap<>();
-
   /** List of region servers that should not get any more new regions. */
   private final ArrayList drainingServers = new ArrayList<>();
 
@@ -393,7 +387,6 @@ public class ServerManager {
   void recordNewServerWithLock(final ServerName serverName, final 
ServerMetrics sl) {
 LOG.info("Registering regionserver=" + serverName);
 this.onlineServers.put(serverName, sl);
-this.rsAdmins.remove(serverName);
   }
 
   public RegionStoreSequenceIds getLastFlushedSequenceId(byte[] 
encodedRegionName) {
@@ -595,7 +588,6 @@ public class ServerManager {
 LOG.trace("Expiration of {} but server not online", sn);
   }
 }
-this.rsAdmins.remove(sn);
   }
 
   /*
@@ -707,18 +699,13 @@ public class ServerManager {
* @throws RetriesExhaustedException wrapping a ConnectException if failed
*/
   public AdminService.BlockingInterface getRsAdmin(final ServerName sn) throws 
IOException {
-AdminService.BlockingInterface admin = this.rsAdmins.get(sn);
-if (admin == null) {
-  LOG.debug("New admin connection to " + sn.toString());
-  if (sn.equals(master.getServerName()) && master instanceof 
HRegionServer) {
-// A master is also a region server now, see HBASE-10569 for details
-admin = ((HRegionServer) master).getRSRpcServices();
-  } else {
-admin = this.connection.getAdmin(sn);
-  }
-  this.rsAdmins.put(sn, admin);
+LOG.debug("New admin connection to {}", sn);
+if (sn.equals(master.getServerName()) && master instanceof HRegionServer) {
+  // A master is also a region server now, see HBASE-10569 for details
+  return ((HRegionServer) master).getRSRpcServices();
+} else {
+  return this.connection.getAdmin(sn);
 }
-return admin;
   }
 
   /**



[hbase] branch branch-3 updated: HBASE-28064:Implement truncate_region command (#5462)

2023-10-23 Thread wchevreuil
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/branch-3 by this push:
 new 32cddeaf536 HBASE-28064:Implement truncate_region command (#5462)
32cddeaf536 is described below

commit 32cddeaf536ec78ed86498b37f7d22a70e2d5d58
Author: VAIBHAV SUBHASH JOSHI 
AuthorDate: Mon Oct 23 15:52:19 2023 +0530

HBASE-28064:Implement truncate_region command (#5462)

Signed-off-by: Wellington Chevreuil 
Signed-off-by: Nihal Jain 
---
 .../java/org/apache/hadoop/hbase/client/Admin.java |  14 ++
 .../hadoop/hbase/client/AdminOverAsyncAdmin.java   |  10 +
 .../org/apache/hadoop/hbase/client/AsyncAdmin.java |   6 +
 .../hadoop/hbase/client/AsyncHBaseAdmin.java   |   5 +
 .../hadoop/hbase/client/RawAsyncHBaseAdmin.java|  66 +++
 .../hbase/shaded/protobuf/RequestConverter.java|  11 ++
 .../src/main/protobuf/server/master/Master.proto   |  16 ++
 .../protobuf/server/master/MasterProcedure.proto   |   8 +
 .../hadoop/hbase/coprocessor/MasterObserver.java   |  40 
 .../org/apache/hadoop/hbase/master/HMaster.java|  31 +++
 .../hadoop/hbase/master/MasterCoprocessorHost.java |  54 +
 .../hadoop/hbase/master/MasterRpcServices.java |  12 ++
 .../apache/hadoop/hbase/master/MasterServices.java |   9 +
 .../hbase/master/assignment/AssignmentManager.java |   6 +
 .../AbstractStateMachineRegionProcedure.java   |   6 +
 .../master/procedure/TableProcedureInterface.java  |   3 +-
 .../hadoop/hbase/master/procedure/TableQueue.java  |   1 +
 .../master/procedure/TruncateRegionProcedure.java  | 219 +
 .../hbase/client/TestAsyncRegionAdminApi2.java |  84 
 .../hbase/master/MockNoopMasterServices.java   |   6 +
 .../procedure/TestTruncateRegionProcedure.java | 202 +++
 .../hbase/rsgroup/VerifyingRSGroupAdmin.java   |  10 +
 hbase-shell/src/main/ruby/hbase/admin.rb   |  10 +
 hbase-shell/src/main/ruby/shell.rb |   1 +
 .../main/ruby/shell/commands/truncate_region.rb|  36 
 hbase-shell/src/test/ruby/hbase/admin_test.rb  |  11 ++
 .../hadoop/hbase/thrift2/client/ThriftAdmin.java   |  10 +
 27 files changed, 886 insertions(+), 1 deletion(-)

diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
index 4d579c16af2..417e0013523 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
@@ -1033,6 +1033,20 @@ public interface Admin extends Abortable, Closeable {
 get(modifyTableAsync(td), getSyncWaitTimeout(), TimeUnit.MILLISECONDS);
   }
 
+  /**
+   * Truncate an individual region.
+   * @param regionName region to truncate
+   * @throws IOException if a remote or network exception occurs
+   */
+  void truncateRegion(byte[] regionName) throws IOException;
+
+  /**
+   * Truncate an individual region. Asynchronous operation.
+   * @param regionName region to truncate
+   * @throws IOException if a remote or network exception occurs
+   */
+  Future truncateRegionAsync(byte[] regionName) throws IOException;
+
   /**
* Modify an existing table, more IRB (ruby) friendly version. Asynchronous 
operation. This means
* that it may be a while before your schema change is updated across all of 
the table. You can
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AdminOverAsyncAdmin.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AdminOverAsyncAdmin.java
index 690b6406fd3..bb620aa3cda 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AdminOverAsyncAdmin.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AdminOverAsyncAdmin.java
@@ -490,6 +490,16 @@ class AdminOverAsyncAdmin implements Admin {
 return admin.splitRegion(regionName, splitPoint);
   }
 
+  @Override
+  public void truncateRegion(byte[] regionName) throws IOException {
+get(admin.truncateRegion(regionName));
+  }
+
+  @Override
+  public Future truncateRegionAsync(byte[] regionName) {
+return admin.truncateRegion(regionName);
+  }
+
   @Override
   public Future modifyTableAsync(TableDescriptor td) throws IOException {
 return admin.modifyTable(td);
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java
index 960982f5e3f..1097abbbf5e 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java
@@ -618,6 +618,12 @@ public interface AsyncAdmin {
*/
   CompletableFuture splitRegion(byte[] regionName, byte[] splitPoint);
 
+  /**
+   * Truncate an individual 

[hbase] branch master updated: HBASE-28064:Implement truncate_region command (#5462)

2023-10-23 Thread wchevreuil
This is an automated email from the ASF dual-hosted git repository.

wchevreuil pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
 new 91ac8abe5d4 HBASE-28064:Implement truncate_region command (#5462)
91ac8abe5d4 is described below

commit 91ac8abe5d408f2ac33745ebad2d4065e496d97b
Author: VAIBHAV SUBHASH JOSHI 
AuthorDate: Mon Oct 23 15:52:19 2023 +0530

HBASE-28064:Implement truncate_region command (#5462)

Signed-off-by: Wellington Chevreuil 
Signed-off-by: Nihal Jain 
---
 .../java/org/apache/hadoop/hbase/client/Admin.java |  14 ++
 .../hadoop/hbase/client/AdminOverAsyncAdmin.java   |  10 +
 .../org/apache/hadoop/hbase/client/AsyncAdmin.java |   6 +
 .../hadoop/hbase/client/AsyncHBaseAdmin.java   |   5 +
 .../hadoop/hbase/client/RawAsyncHBaseAdmin.java|  66 +++
 .../hbase/shaded/protobuf/RequestConverter.java|  11 ++
 .../src/main/protobuf/server/master/Master.proto   |  16 ++
 .../protobuf/server/master/MasterProcedure.proto   |   8 +
 .../hadoop/hbase/coprocessor/MasterObserver.java   |  40 
 .../org/apache/hadoop/hbase/master/HMaster.java|  31 +++
 .../hadoop/hbase/master/MasterCoprocessorHost.java |  54 +
 .../hadoop/hbase/master/MasterRpcServices.java |  12 ++
 .../apache/hadoop/hbase/master/MasterServices.java |   9 +
 .../hbase/master/assignment/AssignmentManager.java |   6 +
 .../AbstractStateMachineRegionProcedure.java   |   6 +
 .../master/procedure/TableProcedureInterface.java  |   3 +-
 .../hadoop/hbase/master/procedure/TableQueue.java  |   1 +
 .../master/procedure/TruncateRegionProcedure.java  | 219 +
 .../hbase/client/TestAsyncRegionAdminApi2.java |  84 
 .../hbase/master/MockNoopMasterServices.java   |   6 +
 .../procedure/TestTruncateRegionProcedure.java | 202 +++
 .../hbase/rsgroup/VerifyingRSGroupAdmin.java   |  10 +
 hbase-shell/src/main/ruby/hbase/admin.rb   |  10 +
 hbase-shell/src/main/ruby/shell.rb |   1 +
 .../main/ruby/shell/commands/truncate_region.rb|  36 
 hbase-shell/src/test/ruby/hbase/admin_test.rb  |  11 ++
 .../hadoop/hbase/thrift2/client/ThriftAdmin.java   |  10 +
 27 files changed, 886 insertions(+), 1 deletion(-)

diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
index 4d579c16af2..417e0013523 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java
@@ -1033,6 +1033,20 @@ public interface Admin extends Abortable, Closeable {
 get(modifyTableAsync(td), getSyncWaitTimeout(), TimeUnit.MILLISECONDS);
   }
 
+  /**
+   * Truncate an individual region.
+   * @param regionName region to truncate
+   * @throws IOException if a remote or network exception occurs
+   */
+  void truncateRegion(byte[] regionName) throws IOException;
+
+  /**
+   * Truncate an individual region. Asynchronous operation.
+   * @param regionName region to truncate
+   * @throws IOException if a remote or network exception occurs
+   */
+  Future truncateRegionAsync(byte[] regionName) throws IOException;
+
   /**
* Modify an existing table, more IRB (ruby) friendly version. Asynchronous 
operation. This means
* that it may be a while before your schema change is updated across all of 
the table. You can
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AdminOverAsyncAdmin.java
 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AdminOverAsyncAdmin.java
index 690b6406fd3..bb620aa3cda 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AdminOverAsyncAdmin.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AdminOverAsyncAdmin.java
@@ -490,6 +490,16 @@ class AdminOverAsyncAdmin implements Admin {
 return admin.splitRegion(regionName, splitPoint);
   }
 
+  @Override
+  public void truncateRegion(byte[] regionName) throws IOException {
+get(admin.truncateRegion(regionName));
+  }
+
+  @Override
+  public Future truncateRegionAsync(byte[] regionName) {
+return admin.truncateRegion(regionName);
+  }
+
   @Override
   public Future modifyTableAsync(TableDescriptor td) throws IOException {
 return admin.modifyTable(td);
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java
index 960982f5e3f..1097abbbf5e 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncAdmin.java
@@ -618,6 +618,12 @@ public interface AsyncAdmin {
*/
   CompletableFuture splitRegion(byte[] regionName, byte[] splitPoint);
 
+  /**
+   * Truncate an individual region.

[hbase] branch branch-2 updated: HBASE-28146: Make ServerManager rsAdmins map thread safe (#5461)

2023-10-23 Thread zhangduo
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/branch-2 by this push:
 new 1641a4abc13 HBASE-28146: Make ServerManager rsAdmins map thread safe 
(#5461)
1641a4abc13 is described below

commit 1641a4abc13c7ad4da216a115107fc772d24d543
Author: Ray Mattingly 
AuthorDate: Mon Oct 23 05:16:14 2023 -0400

HBASE-28146: Make ServerManager rsAdmins map thread safe (#5461)

Co-authored-by: Ray Mattingly 
Signed-off-by: Duo Zhang 
Signed-off-by: Bryan Beaudreault 
---
 .../apache/hadoop/hbase/master/ServerManager.java  | 26 +-
 1 file changed, 6 insertions(+), 20 deletions(-)

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
index ed37fd95444..196a1a582ed 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
@@ -23,7 +23,6 @@ import java.io.IOException;
 import java.net.InetAddress;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
@@ -124,12 +123,6 @@ public class ServerManager {
   private final ConcurrentNavigableMap 
onlineServers =
 new ConcurrentSkipListMap<>();
 
-  /**
-   * Map of admin interfaces per registered regionserver; these interfaces we 
use to control
-   * regionservers out on the cluster
-   */
-  private final Map rsAdmins = new 
HashMap<>();
-
   /** List of region servers that should not get any more new regions. */
   private final ArrayList drainingServers = new ArrayList<>();
 
@@ -402,7 +395,6 @@ public class ServerManager {
   void recordNewServerWithLock(final ServerName serverName, final 
ServerMetrics sl) {
 LOG.info("Registering regionserver=" + serverName);
 this.onlineServers.put(serverName, sl);
-this.rsAdmins.remove(serverName);
   }
 
   public RegionStoreSequenceIds getLastFlushedSequenceId(byte[] 
encodedRegionName) {
@@ -604,7 +596,6 @@ public class ServerManager {
 LOG.trace("Expiration of {} but server not online", sn);
   }
 }
-this.rsAdmins.remove(sn);
   }
 
   /*
@@ -716,18 +707,13 @@ public class ServerManager {
* @throws RetriesExhaustedException wrapping a ConnectException if failed
*/
   public AdminService.BlockingInterface getRsAdmin(final ServerName sn) throws 
IOException {
-AdminService.BlockingInterface admin = this.rsAdmins.get(sn);
-if (admin == null) {
-  LOG.debug("New admin connection to " + sn.toString());
-  if (sn.equals(master.getServerName()) && master instanceof 
HRegionServer) {
-// A master is also a region server now, see HBASE-10569 for details
-admin = ((HRegionServer) master).getRSRpcServices();
-  } else {
-admin = this.connection.getAdmin(sn);
-  }
-  this.rsAdmins.put(sn, admin);
+LOG.debug("New admin connection to {}", sn);
+if (sn.equals(master.getServerName()) && master instanceof HRegionServer) {
+  // A master is also a region server now, see HBASE-10569 for details
+  return ((HRegionServer) master).getRSRpcServices();
+} else {
+  return this.connection.getAdmin(sn);
 }
-return admin;
   }
 
   /**