Accumulo.newClient()
instead@Deprecated public class ZooKeeperInstance extends Object implements Instance
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 and Description |
---|
ZooKeeperInstance(ClientConfiguration config)
Deprecated.
since 2.0.0; use
Accumulo.newClient() instead |
ZooKeeperInstance(String instanceName,
String zooKeepers)
Deprecated.
since 2.0.0; use
Accumulo.newClient() instead |
Modifier and Type | Method and 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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getConnector, getConnector, getConnector
public ZooKeeperInstance(String instanceName, String zooKeepers)
Accumulo.newClient()
insteadinstanceName
- 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.@Deprecated public ZooKeeperInstance(ClientConfiguration config)
Accumulo.newClient()
insteadconfig
- Client configuration for specifying connection options. See
ClientConfiguration
which extends Configuration with convenience methods
specific to Accumulo.public String getInstanceID()
Instance
getInstanceID
in interface Instance
public List<String> getMasterLocations()
Instance
getMasterLocations
in interface Instance
public String getRootTabletLocation()
Instance
getRootTabletLocation
in interface Instance
public String getInstanceName()
Instance
getInstanceName
in interface Instance
public String getZooKeepers()
Instance
getZooKeepers
in interface Instance
public int getZooKeepersSessionTimeOut()
Instance
getZooKeepersSessionTimeOut
in interface Instance
public Connector getConnector(String principal, AuthenticationToken token) throws AccumuloException, AccumuloSecurityException
Instance
getConnector
in interface Instance
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 use PasswordToken
AccumuloException
AccumuloSecurityException
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.