Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
DcsMaster and DcsServers are started independently by the bin/dcs-start.sh script. DcsServers always check that DcsMaster is started in the getMaster() method shown below. A LOG.info event should be added so that user can see that DcsServers are waiting on Dcsmaster to start.
private void getMaster() {
boolean found = false;
while (!found) {
try {
Stat stat = zkc.exists(parentZnode
+ Constants.DEFAULT_ZOOKEEPER_ZNODE_MASTER, false);
if (stat != null) {
List<String> nodes = zkc.getChildren(parentZnode
+ Constants.DEFAULT_ZOOKEEPER_ZNODE_MASTER, null);
if (!nodes.isEmpty()) {
StringTokenizer st = new StringTokenizer(nodes.get(0),
":");
while (st.hasMoreTokens())
found = true;
}
}
if (!found) {
try
catch (InterruptedException e) {
}
}
} catch (Exception e)
{ e.printStackTrace(); LOG.error(e); } }
}