}
myConsole.logResponse("starting `%s' ... ", broker_ip);
String lockPath = "/locks/brk_" + broker_ip;
ZLock brokerLock = new ZLock(lockPath);
ZNode brokerNode = new ZNode("/broker/" + broker_ip);
try{
brokerLock.acquire(LockType.WRITE_LOCK);
ZooKeeperInfo.Broker.Builder brkBuilder = ZooKeeperInfo.Broker.newBuilder();
TextFormat.merge(new String(brokerNode.getContent()), brkBuilder);
brkBuilder.clearStatus().setStatus(ZooKeeperInfo.Broker.Status.ONLINE);
brokerNode.setContent(brkBuilder.build().toString().getBytes());
myConsole.logResponseNL("success");
}
catch(Exception e){
myConsole.logResponseNL("failed");
myConsole.logResponseNL(e.toString());