org.apache.zookeeper.server.admin.AdminServer Java Examples

The following examples show how to use org.apache.zookeeper.server.admin.AdminServer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HQuorumPeer.java    From hbase with Apache License 2.0 5 votes vote down vote up
private static void runZKServer(QuorumPeerConfig zkConfig)
        throws IOException, AdminServer.AdminServerException {
  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);
  }
}
 
Example #2
Source File: LocalServer.java    From flow-platform-x with Apache License 2.0 4 votes vote down vote up
@Override
public void runFromConfig(ServerConfig config) throws IOException, AdminServer.AdminServerException {
    isStarted = true;
    super.runFromConfig(config);
}