RS doesnot abort if the initialization of RS fails
---------------------------------------------------
Key: HBASE-4144
URL: https://issues.apache.org/jira/browse/HBASE-4144
Project: HBase
Issue Type: Bug
Components: regionserver
Reporter: ramkrishna.s.vasudevan
Assignee: ramkrishna.s.vasudevan
Priority: Minor
If any exception occurs while initialization of RS the RS doesnot get
aborted whereas only the RPC server gets stopped.
private void preRegistrationInitialization()
throws IOException, InterruptedException {
try {
initializeZooKeeper();
initializeThreads();
int nbBlocks = conf.getInt("hbase.regionserver.nbreservationblocks",4);
for (int i = 0; i < nbBlocks; i++) {
reservedSpace.add(new
byte[HConstants.DEFAULT_SIZE_RESERVATION_BLOCK]);
}
} catch (Throwable t) {
// Call stop if error or process will stick around for ever since
server
// puts up non-daemon threads.
LOG.error("Stopping HRS because failed initialize", t);
this.rpcServer.stop();
}
}
So if any exception occurs while initilization the RPC server gets stopped
but RS process is still running. But the log says stopping HRegionServer.
So in the below code the catch() block will be executed when the RPCServer
stop fails?
In all other cases it doesnt handle any initialization failure.
try {
// Do pre-registration initializations; zookeeper, lease threads,tc.
preRegistrationInitialization();
} catch (Exception e) {
abort("Fatal exception during initialization", e);
}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira