Threads.shutdown(this.compactSplitThread);
Threads.shutdown(this.hlogRoller);
}
private boolean getMaster() {
HServerAddress masterAddress = null;
while (masterAddress == null) {
if (stopRequested.get()) {
return false;
}
try {
masterAddress = zooKeeperWrapper.readMasterAddressOrThrow();
} catch (IOException e) {
LOG.warn("Unable to read master address from ZooKeeper. Retrying." +
" Error was:", e);
sleeper.sleep();
}
}
LOG.info("Telling master at " + masterAddress + " that we are up");
HMasterRegionInterface master = null;
while (!stopRequested.get() && master == null) {
try {
// Do initial RPC setup. The final argument indicates that the RPC
// should retry indefinitely.
master = (HMasterRegionInterface)HBaseRPC.waitForProxy(
HMasterRegionInterface.class, HBaseRPCProtocolVersion.versionID,
masterAddress.getInetSocketAddress(),
this.conf, -1, this.rpcTimeout);
} catch (IOException e) {
LOG.warn("Unable to connect to master. Retrying. Error was:", e);
sleeper.sleep();
}