Class ZooKeeperInstance

  • All Implemented Interfaces:
    Instance

    public class ZooKeeperInstance
    extends Object
    implements Instance
    An implementation of instance that looks in zookeeper to find information needed to connect to an instance of accumulo.

    The advantage of using zookeeper to obtain information about accumulo is that zookeeper is highly available, very responsive, and supports caching.

    Because it is possible for multiple instances of accumulo to share a single set of zookeeper servers, all constructors require an accumulo instance name. If you do not know the instance names then run accumulo org.apache.accumulo.server.util.ListInstances on an accumulo server.

    • Constructor Detail

      • ZooKeeperInstance

        public ZooKeeperInstance​(String instanceName,
                                 String zooKeepers)
        Parameters:
        instanceName - The name of specific accumulo instance. This is set at initialization time.
        zooKeepers - A comma separated list of zoo keeper server locations. Each location can contain an optional port, of the format host:port.
      • ZooKeeperInstance

        @Deprecated
        public ZooKeeperInstance​(String instanceName,
                                 String zooKeepers,
                                 int sessionTimeout)
        Deprecated.
        since 1.6.0; Use ZooKeeperInstance(ClientConfiguration) instead.
        Parameters:
        instanceName - The name of specific accumulo instance. This is set at initialization time.
        zooKeepers - A comma separated list of zoo keeper server locations. Each location can contain an optional port, of the format host:port.
        sessionTimeout - zoo keeper session time out in milliseconds.
      • ZooKeeperInstance

        @Deprecated
        public ZooKeeperInstance​(UUID instanceId,
                                 String zooKeepers)
        Deprecated.
        since 1.6.0; Use ZooKeeperInstance(ClientConfiguration) instead.
        Parameters:
        instanceId - The UUID that identifies the accumulo instance you want to connect to.
        zooKeepers - A comma separated list of zoo keeper server locations. Each location can contain an optional port, of the format host:port.
      • ZooKeeperInstance

        @Deprecated
        public ZooKeeperInstance​(UUID instanceId,
                                 String zooKeepers,
                                 int sessionTimeout)
        Deprecated.
        since 1.6.0; Use ZooKeeperInstance(ClientConfiguration) instead.
        Parameters:
        instanceId - The UUID that identifies the accumulo instance you want to connect to.
        zooKeepers - A comma separated list of zoo keeper server locations. Each location can contain an optional port, of the format host:port.
        sessionTimeout - zoo keeper session time out in milliseconds.
      • ZooKeeperInstance

        @Deprecated
        public ZooKeeperInstance​(org.apache.commons.configuration.Configuration config)
        Deprecated.
        since 1.9.0; will be removed in 2.0.0 to eliminate commons config leakage into Accumulo API; use ZooKeeperInstance(ClientConfiguration) instead.
        Parameters:
        config - Client configuration for specifying connection options. See ClientConfiguration which extends Configuration with convenience methods specific to Accumulo.
        Since:
        1.6.0
      • ZooKeeperInstance

        public ZooKeeperInstance​(ClientConfiguration config)
        Parameters:
        config - Client configuration for specifying connection options. See ClientConfiguration which extends Configuration with convenience methods specific to Accumulo.
        Since:
        1.9.0