Class 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 Detail

      • DEFAULT_ZOOKEEPER_CLIENT_PORT

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

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

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

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

        public static final int DEFAULT_ZOOKEEPER_LEADER_PORT
        ZooKeeper default leader port.
        See Also:
        Constant Field Values
    • Constructor Detail

      • FlinkZooKeeperQuorumPeer

        public FlinkZooKeeperQuorumPeer()
    • Method Detail

      • 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