Package org.apache.accumulo.core.client
Interface Instance
- All Known Implementing Classes:
MiniAccumuloInstance
,MockInstance
,ZooKeeperInstance
public interface Instance
This class represents the information a client needs to know to connect to an instance of
accumulo.
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.accumulo.core.conf.AccumuloConfiguration
Deprecated.since 1.6.0.getConnector
(String user, byte[] pass) Deprecated.since 1.5, usegetConnector(String, AuthenticationToken)
withPasswordToken
getConnector
(String user, CharSequence pass) Deprecated.since 1.5, usegetConnector(String, AuthenticationToken)
withPasswordToken
getConnector
(String user, ByteBuffer pass) Deprecated.since 1.5, usegetConnector(String, AuthenticationToken)
withPasswordToken
getConnector
(String principal, AuthenticationToken token) Returns a connection to this instance of accumulo.Returns a unique string that identifies this instance of accumulo.Returns the instance name given at system initialization time.Returns the location(s) of the accumulo master and any redundant servers.Returns the location of the tablet server that is serving the root tablet.Returns a comma-separated list of zookeeper servers the instance is using.int
Returns the zookeeper connection timeout.void
setConfiguration
(org.apache.accumulo.core.conf.AccumuloConfiguration conf) Deprecated.since 1.6.0.
-
Method Details
-
getRootTabletLocation
String getRootTabletLocation()Returns the location of the tablet server that is serving the root tablet.- Returns:
- location in "hostname:port" form
-
getMasterLocations
Returns the location(s) of the accumulo master and any redundant servers.- Returns:
- a list of locations in "hostname:port" form
-
getInstanceID
String getInstanceID()Returns a unique string that identifies this instance of accumulo.- Returns:
- a UUID
-
getInstanceName
String getInstanceName()Returns the instance name given at system initialization time.- Returns:
- current instance name
-
getZooKeepers
String getZooKeepers()Returns a comma-separated list of zookeeper servers the instance is using.- Returns:
- the zookeeper servers this instance is using in "hostname:port" form
-
getZooKeepersSessionTimeOut
int getZooKeepersSessionTimeOut()Returns the zookeeper connection timeout.- Returns:
- the configured timeout to connect to zookeeper
-
getConnector
@Deprecated Connector getConnector(String user, byte[] pass) throws AccumuloException, AccumuloSecurityException Deprecated.since 1.5, usegetConnector(String, AuthenticationToken)
withPasswordToken
Returns a connection to accumulo.- Parameters:
user
- a valid accumulo userpass
- A UTF-8 encoded password. The password may be cleared after making this call.- Returns:
- the accumulo Connector
- Throws:
AccumuloException
- when a generic exception occursAccumuloSecurityException
- when a user's credentials are invalid
-
getConnector
@Deprecated Connector getConnector(String user, ByteBuffer pass) throws AccumuloException, AccumuloSecurityException Deprecated.since 1.5, usegetConnector(String, AuthenticationToken)
withPasswordToken
Returns a connection to accumulo.- Parameters:
user
- a valid accumulo userpass
- A UTF-8 encoded password. The password may be cleared after making this call.- Returns:
- the accumulo Connector
- Throws:
AccumuloException
- when a generic exception occursAccumuloSecurityException
- when a user's credentials are invalid
-
getConnector
@Deprecated Connector getConnector(String user, CharSequence pass) throws AccumuloException, AccumuloSecurityException Deprecated.since 1.5, usegetConnector(String, AuthenticationToken)
withPasswordToken
Returns a connection to this instance of accumulo.- Parameters:
user
- a valid accumulo userpass
- If a mutable CharSequence is passed in, it may be cleared after this call.- Returns:
- the accumulo Connector
- Throws:
AccumuloException
- when a generic exception occursAccumuloSecurityException
- when a user's credentials are invalid
-
getConfiguration
Deprecated.since 1.6.0. This method makes very little sense in the context of the client API and never should have been exposed.Returns the AccumuloConfiguration to use when interacting with this instance.- Returns:
- the AccumuloConfiguration that specifies properties related to interacting with this instance
- See Also:
-
setConfiguration
Deprecated.since 1.6.0. This method makes very little sense in the context of the client API and never should have been exposed.Set the AccumuloConfiguration to use when interacting with this instance.- Parameters:
conf
- accumulo configuration- See Also:
-
getConnector
Connector getConnector(String principal, AuthenticationToken token) throws AccumuloException, AccumuloSecurityException Returns a connection to this instance of accumulo.- 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
- Since:
- 1.5.0
-