public class Zookeeper extends Object
Constructor and Description |
---|
Zookeeper() |
Modifier and Type | Method and Description |
---|---|
static org.apache.storm.shade.org.apache.zookeeper.server.NIOServerCnxnFactory |
mkInprocessZookeeper(String localdir,
Integer port) |
static void |
resetInstance()
Resets the singleton instance to the default.
|
static void |
setInstance(Zookeeper u)
Provide an instance of this class for delegates to use.
|
static void |
shutdownInprocessZookeeper(org.apache.storm.shade.org.apache.zookeeper.server.NIOServerCnxnFactory handle) |
static NimbusInfo |
toNimbusInfo(org.apache.storm.shade.org.apache.curator.framework.recipes.leader.Participant participant) |
static ILeaderElector |
zkLeaderElector(Map<String,Object> conf,
org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zkClient,
BlobStore blobStore,
TopoCache tc,
IStormClusterState clusterState,
List<org.apache.storm.shade.org.apache.zookeeper.data.ACL> acls,
StormMetricsRegistry metricsRegistry)
Get master leader elector.
|
protected ILeaderElector |
zkLeaderElectorImpl(Map<String,Object> conf,
org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk,
BlobStore blobStore,
TopoCache tc,
IStormClusterState clusterState,
List<org.apache.storm.shade.org.apache.zookeeper.data.ACL> acls,
StormMetricsRegistry metricsRegistry) |
public static void setInstance(Zookeeper u)
Provide an instance of this class for delegates to use. To mock out delegated methods, provide an instance of a subclass that overrides the implementation of the delegated method.
u
- a Zookeeper instancepublic static void resetInstance()
Resets the singleton instance to the default. This is helpful to reset the class to its original functionality when mocking is no longer desired.
public static org.apache.storm.shade.org.apache.zookeeper.server.NIOServerCnxnFactory mkInprocessZookeeper(String localdir, Integer port) throws Exception
Exception
public static void shutdownInprocessZookeeper(org.apache.storm.shade.org.apache.zookeeper.server.NIOServerCnxnFactory handle)
public static NimbusInfo toNimbusInfo(org.apache.storm.shade.org.apache.curator.framework.recipes.leader.Participant participant)
public static ILeaderElector zkLeaderElector(Map<String,Object> conf, org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zkClient, BlobStore blobStore, TopoCache tc, IStormClusterState clusterState, List<org.apache.storm.shade.org.apache.zookeeper.data.ACL> acls, StormMetricsRegistry metricsRegistry)
Get master leader elector.
conf
- Config.zkClient
- ZkClient, the client must have a default Config.STORM_ZOOKEEPER_ROOT as root path.blobStore
- BlobStore
tc
- TopoCache
clusterState
- IStormClusterState
acls
- ACLsILeaderElector
protected ILeaderElector zkLeaderElectorImpl(Map<String,Object> conf, org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk, BlobStore blobStore, TopoCache tc, IStormClusterState clusterState, List<org.apache.storm.shade.org.apache.zookeeper.data.ACL> acls, StormMetricsRegistry metricsRegistry)
Copyright © 2020 The Apache Software Foundation. All rights reserved.