Package org.apache.accumulo.core.client
Class ZooKeeperInstance
- java.lang.Object
-
- org.apache.accumulo.core.client.ZooKeeperInstance
-
- All Implemented Interfaces:
Instance
@Deprecated public class ZooKeeperInstance extends Object implements Instance
Deprecated.since 2.0.0, UseAccumulo.newClient()
insteadAn 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 Summary
Constructors Constructor Description ZooKeeperInstance(String instanceName, String zooKeepers)
Deprecated.ZooKeeperInstance(ClientConfiguration config)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Connector
getConnector(String principal, AuthenticationToken token)
Deprecated.Returns a connection to this instance of accumulo.String
getInstanceID()
Deprecated.Returns a unique string that identifies this instance of accumulo.String
getInstanceName()
Deprecated.Returns the instance name given at system initialization time.List<String>
getMasterLocations()
Deprecated.Returns the location(s) of the accumulo master and any redundant servers.String
getRootTabletLocation()
Deprecated.Returns the location of the tablet server that is serving the root tablet.String
getZooKeepers()
Deprecated.Returns a comma-separated list of zookeeper servers the instance is using.int
getZooKeepersSessionTimeOut()
Deprecated.Returns the zookeeper connection timeout.String
toString()
Deprecated.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.accumulo.core.client.Instance
getConnector, getConnector, getConnector
-
-
-
-
Constructor Detail
-
ZooKeeperInstance
public ZooKeeperInstance(String instanceName, String zooKeepers)
Deprecated.- 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
public ZooKeeperInstance(ClientConfiguration config)
Deprecated.- Parameters:
config
- Client configuration for specifying connection options. SeeClientConfiguration
which extends Configuration with convenience methods specific to Accumulo.- Since:
- 1.9.0
-
-
Method Detail
-
getInstanceID
public String getInstanceID()
Deprecated.Description copied from interface:Instance
Returns a unique string that identifies this instance of accumulo.- Specified by:
getInstanceID
in interfaceInstance
- Returns:
- a UUID
-
getMasterLocations
public List<String> getMasterLocations()
Deprecated.Description copied from interface:Instance
Returns the location(s) of the accumulo master and any redundant servers.- Specified by:
getMasterLocations
in interfaceInstance
- Returns:
- a list of locations in "hostname:port" form
-
getRootTabletLocation
public String getRootTabletLocation()
Deprecated.Description copied from interface:Instance
Returns the location of the tablet server that is serving the root tablet.- Specified by:
getRootTabletLocation
in interfaceInstance
- Returns:
- location in "hostname:port" form
-
getInstanceName
public String getInstanceName()
Deprecated.Description copied from interface:Instance
Returns the instance name given at system initialization time.- Specified by:
getInstanceName
in interfaceInstance
- Returns:
- current instance name
-
getZooKeepers
public String getZooKeepers()
Deprecated.Description copied from interface:Instance
Returns a comma-separated list of zookeeper servers the instance is using.- Specified by:
getZooKeepers
in interfaceInstance
- Returns:
- the zookeeper servers this instance is using in "hostname:port" form
-
getZooKeepersSessionTimeOut
public int getZooKeepersSessionTimeOut()
Deprecated.Description copied from interface:Instance
Returns the zookeeper connection timeout.- Specified by:
getZooKeepersSessionTimeOut
in interfaceInstance
- Returns:
- the configured timeout to connect to zookeeper
-
getConnector
public Connector getConnector(String principal, AuthenticationToken token) throws AccumuloException, AccumuloSecurityException
Deprecated.Description copied from interface:Instance
Returns a connection to this instance of accumulo.- Specified by:
getConnector
in interfaceInstance
- Parameters:
principal
- a valid accumulo usertoken
- Use the token type configured for the Accumulo instance you are connecting to. An Accumulo instance with default configurations will usePasswordToken
- Throws:
AccumuloException
AccumuloSecurityException
-
-