org.apache.accumulo.core.client.mock
Class MockInstanceOperations

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

public class MockInstanceOperations
extends Object
implements InstanceOperations


Constructor Summary
MockInstanceOperations(MockAccumulo acu)
           
 
Method Summary
 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 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

MockInstanceOperations

public MockInstanceOperations(MockAccumulo acu)
Parameters:
acu -
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.

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


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