org.apache.accumulo.core.client.admin
Class InstanceOperationsImpl

java.lang.Object
  extended by org.apache.accumulo.core.client.admin.InstanceOperationsImpl
All Implemented Interfaces:
InstanceOperations

public class InstanceOperationsImpl
extends Object
implements InstanceOperations

Provides a class for administering the accumulo instance


Constructor Summary
InstanceOperationsImpl(Instance instance, TCredentials credentials)
           
 
Method Summary
 List<ActiveCompaction> getActiveCompactions(String tserver)
          List the active compaction running on a tablet server
 List<ActiveScan> getActiveScans(String tserver)
          List the active scans on tablet server.
 Map<String,String> getSiteConfiguration()
           
 Map<String,String> getSystemConfiguration()
           
 List<String> getTabletServers()
          List the currently active tablet servers participating in the accumulo instance
 void ping(String tserver)
          Throws an exception if a tablet server can not be contacted.
 void removeProperty(String property)
          Removes a instance property from zookeeper
 void setProperty(String property, String value)
          Sets an instance property in zookeeper.
 boolean testClassLoad(String className, String asTypeName)
          Test to see if the instance can load the given class as the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstanceOperationsImpl

public InstanceOperationsImpl(Instance instance,
                              TCredentials credentials)
Parameters:
instance - the connection information for this instance
credentials - the Credential, containing principal and Authentication Token
Method Detail

setProperty

public void setProperty(String property,
                        String value)
                 throws AccumuloException,
                        AccumuloSecurityException
Description copied from interface: InstanceOperations
Sets an instance property in zookeeper. Tablet servers will pull this setting and override the equivalent setting in accumulo-site.xml

Specified by:
setProperty in interface InstanceOperations
Parameters:
property - the name of a per-table property
value - the value to set a per-table property to
Throws:
AccumuloException - if a general error occurs
AccumuloSecurityException - if the user does not have permission

removeProperty

public void removeProperty(String property)
                    throws AccumuloException,
                           AccumuloSecurityException
Description copied from interface: InstanceOperations
Removes a instance property from zookeeper

Specified by:
removeProperty in interface InstanceOperations
Parameters:
property - the name of a per-table property
Throws:
AccumuloException - if a general error occurs
AccumuloSecurityException - if the user does not have permission

getSystemConfiguration

public Map<String,String> getSystemConfiguration()
                                          throws AccumuloException,
                                                 AccumuloSecurityException
Specified by:
getSystemConfiguration in interface InstanceOperations
Throws:
AccumuloException
AccumuloSecurityException

getSiteConfiguration

public Map<String,String> getSiteConfiguration()
                                        throws AccumuloException,
                                               AccumuloSecurityException
Specified by:
getSiteConfiguration in interface InstanceOperations
Throws:
AccumuloException
AccumuloSecurityException

getTabletServers

public List<String> getTabletServers()
Description copied from interface: InstanceOperations
List the currently active tablet servers participating in the accumulo instance

Specified by:
getTabletServers in interface InstanceOperations
Returns:
A list of currently active tablet servers.

getActiveScans

public List<ActiveScan> getActiveScans(String tserver)
                                throws AccumuloException,
                                       AccumuloSecurityException
Description copied from interface: InstanceOperations
List the active scans on tablet server.

Specified by:
getActiveScans in interface InstanceOperations
Parameters:
tserver - The tablet server address should be of the form :
Returns:
A list of active scans on tablet server.
Throws:
AccumuloException
AccumuloSecurityException

testClassLoad

public boolean testClassLoad(String className,
                             String asTypeName)
                      throws AccumuloException,
                             AccumuloSecurityException
Description copied from interface: InstanceOperations
Test to see if the instance can load the given class as the given type. This check does not consider per table classpaths, see TableOperations.testClassLoad(String, String, String)

Specified by:
testClassLoad in interface InstanceOperations
Returns:
true if the instance can load the given class as the given type, false otherwise
Throws:
AccumuloException
AccumuloSecurityException

getActiveCompactions

public List<ActiveCompaction> getActiveCompactions(String tserver)
                                            throws AccumuloException,
                                                   AccumuloSecurityException
Description copied from interface: InstanceOperations
List the active compaction running on a tablet server

Specified by:
getActiveCompactions in interface InstanceOperations
Parameters:
tserver - The tablet server address should be of the form :
Returns:
the list of active compactions
Throws:
AccumuloException
AccumuloSecurityException

ping

public void ping(String tserver)
          throws AccumuloException
Description copied from interface: InstanceOperations
Throws an exception if a tablet server can not be contacted.

Specified by:
ping in interface InstanceOperations
Parameters:
tserver - The tablet server address should be of the form :
Throws:
AccumuloException


Copyright © 2013 Apache Accumulo Project. All Rights Reserved.