HBASE-21166 Creating a CoprocessorHConnection re-retrieves the cluster id from ZK.
This commit is contained in:
parent
e03e4c9f5a
commit
d236a5fab8
|
@ -638,9 +638,14 @@ class ConnectionManager {
|
|||
private final ReentrantLock userRegionLock = new ReentrantLock();
|
||||
|
||||
|
||||
HConnectionImplementation(Configuration conf, boolean managed) throws IOException {
|
||||
this(conf, managed, null, null);
|
||||
}
|
||||
HConnectionImplementation(Configuration conf, boolean managed) throws IOException {
|
||||
this(conf, managed, null, null);
|
||||
}
|
||||
|
||||
HConnectionImplementation(Configuration conf, boolean managed, ExecutorService pool, User user)
|
||||
throws IOException {
|
||||
this(conf, managed, pool, user, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* constructor
|
||||
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue