Class Zookeeper

java.lang.Object
org.apache.storm.zookeeper.Zookeeper

public class Zookeeper extends Object
  • Constructor Details

    • Zookeeper

      public Zookeeper()
  • Method Details

    • setInstance

      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.
      Parameters:
      u - a Zookeeper instance
    • resetInstance

      public 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.
    • mkInprocessZookeeper

      public static org.apache.storm.shade.org.apache.zookeeper.server.NIOServerCnxnFactory mkInprocessZookeeper(String localdir, Integer port) throws Exception
      Throws:
      Exception
    • shutdownInprocessZookeeper

      public static void shutdownInprocessZookeeper(org.apache.storm.shade.org.apache.zookeeper.server.NIOServerCnxnFactory handle)
    • toNimbusInfo

      public static NimbusInfo toNimbusInfo(org.apache.storm.shade.org.apache.curator.framework.recipes.leader.Participant participant)
    • zkLeaderElector

      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.
      Parameters:
      conf - Config.
      zkClient - ZkClient, the client must have a default Config.STORM_ZOOKEEPER_ROOT as root path.
      blobStore - BlobStore
      tc - TopoCache
      clusterState - IStormClusterState
      acls - ACLs
      Returns:
      Instance of ILeaderElector
    • zkLeaderElectorImpl

      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)