// Configure a local zookeeper instance
Properties zkProperties = generateLocalZkProperties();
QuorumPeerConfig qpConfig = new QuorumPeerConfig();
qpConfig.parseProperties(zkProperties);
// run the zookeeper instance
final ServerConfig zkConfig = new ServerConfig();
zkConfig.readFrom(qpConfig);
zookeeper.runFromConfig(zkConfig);
} catch (QuorumPeerConfig.ConfigException qpcce) {
throw new RuntimeException("parse of generated ZK config file " +
"has failed.", qpcce);
} catch (IOException e) {