Class FlinkZooKeeperQuorumPeer
- java.lang.Object
-
- org.apache.flink.runtime.zookeeper.FlinkZooKeeperQuorumPeer
-
public class FlinkZooKeeperQuorumPeer extends Object
Simple wrapper for ZooKeeper'sQuorumPeer
, which reads a ZooKeeper config file and writes the required 'myid' file before starting the peer.
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_ZOOKEEPER_CLIENT_PORT
ZooKeeper default client port.static int
DEFAULT_ZOOKEEPER_INIT_LIMIT
ZooKeeper default init limit.static int
DEFAULT_ZOOKEEPER_LEADER_PORT
ZooKeeper default leader port.static int
DEFAULT_ZOOKEEPER_PEER_PORT
ZooKeeper default peer port.static int
DEFAULT_ZOOKEEPER_SYNC_LIMIT
ZooKeeper default sync limit.
-
Constructor Summary
Constructors Constructor Description FlinkZooKeeperQuorumPeer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
static void
runFlinkZkQuorumPeer(String zkConfigFile, int peerId)
Runs a ZooKeeperQuorumPeer
if further peers are configured or a singleZooKeeperServer
if no further peers are configured.
-
-
-
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
-
-
Method Detail
-
main
public static void main(String[] args)
-
runFlinkZkQuorumPeer
public static void runFlinkZkQuorumPeer(String zkConfigFile, int peerId) throws Exception
Runs a ZooKeeperQuorumPeer
if further peers are configured or a singleZooKeeperServer
if no further peers are configured.- Parameters:
zkConfigFile
- ZooKeeper config file 'zoo.cfg'peerId
- ID for the 'myid' file- Throws:
Exception
-
-