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()
          Returns the AccumuloConfiguration to use when interacting with this instance.
 Connector getConnector(AuthInfo auth)
          Returns a connection to accumulo.
 Connector getConnector(String user, byte[] pass)
          Returns a connection to accumulo.
 Connector getConnector(String user, ByteBuffer pass)
          Returns a connection to accumulo.
 Connector getConnector(String user, CharSequence pass)
          Returns a connection to this instance of accumulo.
 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)
          Set the AccumuloConfiguration to use when interacting with this instance.
 

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

Connector getConnector(String user,
                       byte[] pass)
                       throws AccumuloException,
                              AccumuloSecurityException
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

Connector getConnector(AuthInfo auth)
                       throws AccumuloException,
                              AccumuloSecurityException
Returns a connection to accumulo.

Parameters:
auth - An AuthInfo object.
Returns:
the accumulo Connector
Throws:
AccumuloException - when a generic exception occurs
AccumuloSecurityException - when a user's credentials are invalid

getConnector

Connector getConnector(String user,
                       ByteBuffer pass)
                       throws AccumuloException,
                              AccumuloSecurityException
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

Connector getConnector(String user,
                       CharSequence pass)
                       throws AccumuloException,
                              AccumuloSecurityException
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

AccumuloConfiguration getConfiguration()
Returns the AccumuloConfiguration to use when interacting with this instance.

Returns:
the AccumuloConfiguration that specifies properties related to interacting with this instance

setConfiguration

void setConfiguration(AccumuloConfiguration conf)
Set the AccumuloConfiguration to use when interacting with this instance.

Parameters:
conf - accumulo configuration


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.