Class FlinkZooKeeperQuorumPeer
java.lang.Object
org.apache.flink.runtime.zookeeper.FlinkZooKeeperQuorumPeer
Simple wrapper for ZooKeeper's
QuorumPeer, which reads a ZooKeeper config file and writes
the required 'myid' file before starting the peer.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intZooKeeper default client port.static final intZooKeeper default init limit.static final intZooKeeper default leader port.static final intZooKeeper default peer port.static final intZooKeeper default sync limit. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidrunFlinkZkQuorumPeer(String zkConfigFile, int peerId) Runs a ZooKeeperQuorumPeerif further peers are configured or a singleZooKeeperServerif no further peers are configured.
-
Field Details
-
DEFAULT_ZOOKEEPER_CLIENT_PORT
public static final int DEFAULT_ZOOKEEPER_CLIENT_PORTZooKeeper default client port.- See Also:
-
DEFAULT_ZOOKEEPER_INIT_LIMIT
public static final int DEFAULT_ZOOKEEPER_INIT_LIMITZooKeeper default init limit.- See Also:
-
DEFAULT_ZOOKEEPER_SYNC_LIMIT
public static final int DEFAULT_ZOOKEEPER_SYNC_LIMITZooKeeper default sync limit.- See Also:
-
DEFAULT_ZOOKEEPER_PEER_PORT
public static final int DEFAULT_ZOOKEEPER_PEER_PORTZooKeeper default peer port.- See Also:
-
DEFAULT_ZOOKEEPER_LEADER_PORT
public static final int DEFAULT_ZOOKEEPER_LEADER_PORTZooKeeper default leader port.- See Also:
-
-
Constructor Details
-
FlinkZooKeeperQuorumPeer
public FlinkZooKeeperQuorumPeer()
-
-
Method Details
-
main
-
runFlinkZkQuorumPeer
Runs a ZooKeeperQuorumPeerif further peers are configured or a singleZooKeeperServerif no further peers are configured.- Parameters:
zkConfigFile- ZooKeeper config file 'zoo.cfg'peerId- ID for the 'myid' file- Throws:
Exception
-