/** * Parse ZooKeeper configuration from Wasp XML config and run a QuorumPeer. * @param args String[] of command line arguments. Not used. */ public static void main(String[] args) { Configuration conf = WaspConfiguration.create(); try { Properties zkProperties = ZKConfig.makeZKProps(conf); writeMyID(conf, zkProperties); QuorumPeerConfig zkConfig = new QuorumPeerConfig(); zkConfig.parseProperties(zkProperties); runZKServer(zkConfig); } catch (Exception e) { e.printStackTrace(); System.exit(-1); } }
String[] parts = value.split(":"); String address = parts[0]; if (addressIsLocalHost(address) || ips.contains(address)) { myId = id; break;