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

java.lang.Object
  extended by org.apache.accumulo.core.client.admin.TableOperationsHelper
All Implemented Interfaces:
TableOperations
Direct Known Subclasses:
MockTableOperations, TableOperationsImpl

public abstract class TableOperationsHelper
extends Object
implements TableOperations


Constructor Summary
TableOperationsHelper()
           
 
Method Summary
 void attachIterator(String tableName, IteratorSetting setting)
          Add an iterator to a table on all scopes.
 void attachIterator(String tableName, IteratorSetting setting, EnumSet<IteratorUtil.IteratorScope> scopes)
          Add an iterator to a table on the given scopes.
 void checkIteratorConflicts(String tableName, IteratorSetting setting, EnumSet<IteratorUtil.IteratorScope> scopes)
          Check whether a given iterator configuration conflicts with existing configuration; in particular, determine if the name or priority are already in use for the specified scopes.
 IteratorSetting getIteratorSetting(String tableName, String name, IteratorUtil.IteratorScope scope)
          Get the settings for an iterator.
 Map<String,EnumSet<IteratorUtil.IteratorScope>> listIterators(String tableName)
          Get a list of iterators for this table.
 void removeIterator(String tableName, String name, EnumSet<IteratorUtil.IteratorScope> scopes)
          Remove an iterator from a table by name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.accumulo.core.client.admin.TableOperations
addAggregators, addSplits, clearLocatorCache, clone, compact, create, create, create, delete, deleteRows, exists, flush, flush, getLocalityGroups, getMaxRow, getProperties, getSplits, getSplits, importDirectory, importDirectory, list, merge, offline, online, removeProperty, rename, setLocalityGroups, setProperty, splitRangeByTablets, tableIdMap
 

Constructor Detail

TableOperationsHelper

public TableOperationsHelper()
Method Detail

attachIterator

public void attachIterator(String tableName,
                           IteratorSetting setting)
                    throws AccumuloSecurityException,
                           AccumuloException,
                           TableNotFoundException
Description copied from interface: TableOperations
Add an iterator to a table on all scopes.

Specified by:
attachIterator in interface TableOperations
Parameters:
tableName - the name of the table
setting - object specifying the properties of the iterator
Throws:
AccumuloSecurityException - thrown if the user does not have the ability to set properties on the table
AccumuloException
TableNotFoundException - throw if the table no longer exists

attachIterator

public void attachIterator(String tableName,
                           IteratorSetting setting,
                           EnumSet<IteratorUtil.IteratorScope> scopes)
                    throws AccumuloSecurityException,
                           AccumuloException,
                           TableNotFoundException
Description copied from interface: TableOperations
Add an iterator to a table on the given scopes.

Specified by:
attachIterator in interface TableOperations
Parameters:
tableName - the name of the table
setting - object specifying the properties of the iterator
Throws:
AccumuloSecurityException - thrown if the user does not have the ability to set properties on the table
AccumuloException
TableNotFoundException - throw if the table no longer exists

removeIterator

public void removeIterator(String tableName,
                           String name,
                           EnumSet<IteratorUtil.IteratorScope> scopes)
                    throws AccumuloSecurityException,
                           AccumuloException,
                           TableNotFoundException
Description copied from interface: TableOperations
Remove an iterator from a table by name.

Specified by:
removeIterator in interface TableOperations
Parameters:
tableName - the name of the table
name - the name of the iterator
scopes - the scopes of the iterator
Throws:
AccumuloSecurityException - thrown if the user does not have the ability to set properties on the table
AccumuloException
TableNotFoundException - throw if the table no longer exists

getIteratorSetting

public IteratorSetting getIteratorSetting(String tableName,
                                          String name,
                                          IteratorUtil.IteratorScope scope)
                                   throws AccumuloSecurityException,
                                          AccumuloException,
                                          TableNotFoundException
Description copied from interface: TableOperations
Get the settings for an iterator.

Specified by:
getIteratorSetting in interface TableOperations
Parameters:
tableName - the name of the table
name - the name of the iterator
scope - the scope of the iterator
Returns:
the settings for this iterator
Throws:
AccumuloSecurityException - thrown if the user does not have the ability to set properties on the table
AccumuloException
TableNotFoundException - throw if the table no longer exists

listIterators

public Map<String,EnumSet<IteratorUtil.IteratorScope>> listIterators(String tableName)
                                                              throws AccumuloSecurityException,
                                                                     AccumuloException,
                                                                     TableNotFoundException
Description copied from interface: TableOperations
Get a list of iterators for this table.

Specified by:
listIterators in interface TableOperations
Parameters:
tableName - the name of the table
Returns:
a set of iterator names
Throws:
AccumuloSecurityException
AccumuloException
TableNotFoundException

checkIteratorConflicts

public void checkIteratorConflicts(String tableName,
                                   IteratorSetting setting,
                                   EnumSet<IteratorUtil.IteratorScope> scopes)
                            throws AccumuloException,
                                   TableNotFoundException
Description copied from interface: TableOperations
Check whether a given iterator configuration conflicts with existing configuration; in particular, determine if the name or priority are already in use for the specified scopes.

Specified by:
checkIteratorConflicts in interface TableOperations
Parameters:
tableName - the name of the table
setting - object specifying the properties of the iterator
Throws:
AccumuloException
TableNotFoundException


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