use of org.apache.flink.shaded.zookeeper3.org.apache.zookeeper.server.ZooKeeperServerMain in project hbase by apache.
the class HQuorumPeer method runZKServer.
private static void runZKServer(QuorumPeerConfig zkConfig) throws IOException, AdminServer.AdminServerException {
/**
* Start and schedule the purge task
* autopurge.purgeInterval is 0 by default,so in fact the DatadirCleanupManager task will not
* be started to clean the logs by default. Config is recommended only for standalone server.
*/
DatadirCleanupManager purgeMgr = new DatadirCleanupManager(zkConfig.getDataDir(), zkConfig.getDataLogDir(), zkConfig.getSnapRetainCount(), zkConfig.getPurgeInterval());
purgeMgr.start();
if (zkConfig.isDistributed()) {
QuorumPeerMain qp = new QuorumPeerMain();
qp.runFromConfig(zkConfig);
} else {
ZooKeeperServerMain zk = new ZooKeeperServerMain();
ServerConfig serverConfig = new ServerConfig();
serverConfig.readFrom(zkConfig);
zk.runFromConfig(serverConfig);
}
}
Aggregations