org.apache.accumulo.core.client
Interface Instance

All Known Implementing Classes:
MockInstance, ZooKeeperInstance

public interface Instance

This class represents the information a client needs to know to connect to an instance of accumulo.


Method Summary
 AccumuloConfiguration 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.
 Connector getConnector(String principal, AuthenticationToken token)
          Returns a connection to this instance of accumulo.
 Connector getConnector(String user, byte[] pass)
          Deprecated. since 1.5, use getConnector(String, AuthenticationToken) with PasswordToken
 Connector getConnector(String user, ByteBuffer pass)
          Deprecated. since 1.5, use getConnector(String, AuthenticationToken) with PasswordToken
 Connector getConnector(String user, CharSequence pass)
          Deprecated. since 1.5, use getConnector(String, AuthenticationToken) with PasswordToken
 String getInstanceID()
          Returns a unique string that identifies this instance of accumulo.
 String getInstanceName()
          Returns the instance name given at system initialization time.
 List<String> getMasterLocations()
          Returns the location(s) of the accumulo master and any redundant servers.
 String getRootTabletLocation()
          Returns the location of the tablet server that is serving the root tablet.
 String getZooKeepers()
          Returns a comma-separated list of zookeeper servers the instance is using.
 int getZooKeepersSessionTimeOut()
          Returns the zookeeper connection timeout.
 void setConfiguration(AccumuloConfiguration conf)
          Deprecated. since 1.6.0. This method makes very little sense in the context of the client API and never should have been exposed.
 

Method Detail

getRootTabletLocation

String getRootTabletLocation()
Returns the location of the tablet server that is serving the root tablet.

Returns:
location in "hostname:port" form

getMasterLocations

List<String> 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, use getConnector(String, AuthenticationToken) with PasswordToken

Returns a connection to accumulo.

Parameters:
user - a valid accumulo user
pass - A UTF-8 encoded password. The password may be cleared after making this call.
Returns:
the accumulo Connector
Throws:
AccumuloException - when a generic exception occurs
AccumuloSecurityException - when a user's credentials are invalid

getConnector

@Deprecated
Connector getConnector(String user,
                                  ByteBuffer pass)
                       throws AccumuloException,
                              AccumuloSecurityException
Deprecated. since 1.5, use getConnector(String, AuthenticationToken) with PasswordToken

Returns a connection to accumulo.

Parameters:
user - a valid accumulo user
pass - A UTF-8 encoded password. The password may be cleared after making this call.
Returns:
the accumulo Connector
Throws:
AccumuloException - when a generic exception occurs
AccumuloSecurityException - when a user's credentials are invalid

getConnector

@Deprecated
Connector getConnector(String user,
                                  CharSequence pass)
                       throws AccumuloException,
                              AccumuloSecurityException
Deprecated. since 1.5, use getConnector(String, AuthenticationToken) with PasswordToken

Returns a connection to this instance of accumulo.

Parameters:
user - a valid accumulo user
pass - If a mutable CharSequence is passed in, it may be cleared after this call.
Returns:
the accumulo Connector
Throws:
AccumuloException - when a generic exception occurs
AccumuloSecurityException - when a user's credentials are invalid

getConfiguration

@Deprecated
AccumuloConfiguration 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:
for client-side reading of the server-side configuration.

setConfiguration

@Deprecated
void setConfiguration(AccumuloConfiguration conf)
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:
InstanceOperations.setProperty(String, String)

getConnector

Connector getConnector(String principal,
                       AuthenticationToken token)
                       throws AccumuloException,
                              AccumuloSecurityException
Returns a connection to this instance of accumulo.

Parameters:
principal - a valid accumulo user
token - Use the token type configured for the Accumulo instance you are connecting to. An Accumulo instance with default configurations will use PasswordToken
Throws:
AccumuloException
AccumuloSecurityException
Since:
1.5.0


Copyright © 2015 Apache Accumulo Project. All rights reserved.