HBASE-14455 Try to get rid of unused HConnection instance
Signed-off-by: stack <stack@apache.org>
This commit is contained in:
parent
b6bd811c76
commit
487f741721
|
@ -74,6 +74,7 @@ import org.apache.hadoop.hbase.TableNotDisabledException;
|
|||
import org.apache.hadoop.hbase.TableNotFoundException;
|
||||
import org.apache.hadoop.hbase.UnknownRegionException;
|
||||
import org.apache.hadoop.hbase.classification.InterfaceAudience;
|
||||
import org.apache.hadoop.hbase.client.ClusterConnection;
|
||||
import org.apache.hadoop.hbase.client.RegionReplicaUtil;
|
||||
import org.apache.hadoop.hbase.client.Result;
|
||||
import org.apache.hadoop.hbase.client.TableState;
|
||||
|
@ -660,8 +661,6 @@ public class HMaster extends HRegionServer implements MasterServices, Server {
|
|||
ZKClusterId.setClusterId(this.zooKeeper, fileSystemManager.getClusterId());
|
||||
this.serverManager = createServerManager(this, this);
|
||||
|
||||
setupClusterConnection();
|
||||
|
||||
// Invalidate all write locks held previously
|
||||
this.tableLockManager.reapWriteLocks();
|
||||
this.tableStateManager = new TableStateManager(this);
|
||||
|
@ -850,6 +849,7 @@ public class HMaster extends HRegionServer implements MasterServices, Server {
|
|||
throws IOException {
|
||||
// We put this out here in a method so can do a Mockito.spy and stub it out
|
||||
// w/ a mocked up ServerManager.
|
||||
setupClusterConnection();
|
||||
return new ServerManager(master, services);
|
||||
}
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ public class ServerManager {
|
|||
Configuration c = master.getConfiguration();
|
||||
maxSkew = c.getLong("hbase.master.maxclockskew", 30000);
|
||||
warningSkew = c.getLong("hbase.master.warningclockskew", 10000);
|
||||
this.connection = connect ? (ClusterConnection)ConnectionFactory.createConnection(c) : null;
|
||||
this.connection = connect ? master.getConnection() : null;
|
||||
int pingMaxAttempts = Math.max(1, master.getConfiguration().getInt(
|
||||
"hbase.master.maximum.ping.server.attempts", 10));
|
||||
int pingSleepInterval = Math.max(1, master.getConfiguration().getInt(
|
||||
|
|
Loading…
Reference in New Issue