HBASE-21166 Creating a CoprocessorHConnection re-retrieves the cluster id from ZK.

This commit is contained in:
Lars Hofhansl 2018-09-07 15:16:54 -07:00
parent e03e4c9f5a
commit d236a5fab8
2 changed files with 11 additions and 5 deletions

View File

@ -642,6 +642,11 @@ class ConnectionManager {
this(conf, managed, null, null);
}
HConnectionImplementation(Configuration conf, boolean managed, ExecutorService pool, User user)
throws IOException {
this(conf, managed, pool, user, null);
}
/**
* constructor
* @param conf Configuration object
@ -654,7 +659,8 @@ class ConnectionManager {
* users of an HConnectionImplementation instance.
*/
HConnectionImplementation(Configuration conf, boolean managed,
ExecutorService pool, User user) throws IOException {
ExecutorService pool, User user, String clusterId) throws IOException {
this.clusterId = clusterId;
this.conf = conf;
this.user = user;
this.batchPool = pool;

View File

@ -96,7 +96,7 @@ public class CoprocessorHConnection extends HConnectionImplementation {
* @throws IOException if we cannot create the connection
*/
public CoprocessorHConnection(Configuration conf, HRegionServer server) throws IOException {
super(conf, false, null, UserProvider.instantiate(conf).getCurrent());
super(conf, false, null, UserProvider.instantiate(conf).getCurrent(), server.getClusterId());
this.server = server;
this.serverName = server.getServerName();
}