Class FlinkZooKeeperQuorumPeer

java.lang.Object
org.apache.flink.runtime.zookeeper.FlinkZooKeeperQuorumPeer

public class FlinkZooKeeperQuorumPeer extends Object
Simple wrapper for ZooKeeper's QuorumPeer, which reads a ZooKeeper config file and writes the required 'myid' file before starting the peer.
  • Field Details

    • DEFAULT_ZOOKEEPER_CLIENT_PORT

      public static final int DEFAULT_ZOOKEEPER_CLIENT_PORT
      ZooKeeper default client port.
      See Also:
    • DEFAULT_ZOOKEEPER_INIT_LIMIT

      public static final int DEFAULT_ZOOKEEPER_INIT_LIMIT
      ZooKeeper default init limit.
      See Also:
    • DEFAULT_ZOOKEEPER_SYNC_LIMIT

      public static final int DEFAULT_ZOOKEEPER_SYNC_LIMIT
      ZooKeeper default sync limit.
      See Also:
    • DEFAULT_ZOOKEEPER_PEER_PORT

      public static final int DEFAULT_ZOOKEEPER_PEER_PORT
      ZooKeeper default peer port.
      See Also:
    • DEFAULT_ZOOKEEPER_LEADER_PORT

      public static final int DEFAULT_ZOOKEEPER_LEADER_PORT
      ZooKeeper default leader port.
      See Also:
  • Constructor Details

    • FlinkZooKeeperQuorumPeer

      public FlinkZooKeeperQuorumPeer()
  • Method Details

    • main

      public static void main(String[] args)
    • runFlinkZkQuorumPeer

      public static void runFlinkZkQuorumPeer(String zkConfigFile, int peerId) throws Exception
      Runs a ZooKeeper QuorumPeer if further peers are configured or a single ZooKeeperServer if no further peers are configured.
      Parameters:
      zkConfigFile - ZooKeeper config file 'zoo.cfg'
      peerId - ID for the 'myid' file
      Throws:
      Exception