Class TableOperationsHelper
- java.lang.Object
-
- org.apache.accumulo.core.clientImpl.TableOperationsHelper
-
- All Implemented Interfaces:
TableOperations
- Direct Known Subclasses:
TableOperationsImpl
public abstract class TableOperationsHelper extends Object implements TableOperations
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.accumulo.core.client.admin.TableOperations
TableOperations.ImportDestinationArguments, TableOperations.ImportMappingOptions, TableOperations.ImportOptions
-
-
Constructor Summary
Constructors Constructor Description TableOperationsHelper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
addConstraint(String tableName, String constraintClassName)
Add a new constraint to a table.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.static void
checkIteratorConflicts(Map<String,String> props, IteratorSetting setting, EnumSet<IteratorUtil.IteratorScope> scopes)
IteratorSetting
getIteratorSetting(String tableName, String name, IteratorUtil.IteratorScope scope)
Get the settings for an iterator.Map<String,Integer>
listConstraints(String tableName)
List constraints on a table with their assigned numbers.Map<String,EnumSet<IteratorUtil.IteratorScope>>
listIterators(String tableName)
Get a list of iterators for this table.void
removeConstraint(String tableName, int number)
Remove a constraint from a 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
addSplits, addSummarizers, cancelCompaction, clearLocatorCache, clearSamplerConfiguration, clone, clone, compact, compact, compact, create, create, create, create, delete, deleteRows, exists, exportTable, flush, flush, getConfiguration, getDiskUsage, getLocalityGroups, getMaxRow, getProperties, getSamplerConfiguration, getSplits, getSplits, getTableProperties, getTimeType, importDirectory, importDirectory, importTable, importTable, isOnline, list, listSplits, listSplits, listSummarizers, locate, merge, modifyProperties, offline, offline, online, online, removeProperty, removeSummarizers, rename, setLocalityGroups, setProperty, setSamplerConfiguration, splitRangeByTablets, summaries, tableIdMap, testClassLoad
-
-
-
-
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 interfaceTableOperations
- Parameters:
tableName
- the name of the tablesetting
- object specifying the properties of the iterator- Throws:
AccumuloSecurityException
- thrown if the user does not have the ability to set properties on the tableTableNotFoundException
- throw if the table no longer existsAccumuloException
-
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 interfaceTableOperations
- Parameters:
tableName
- the name of the tablesetting
- object specifying the properties of the iterator- Throws:
AccumuloSecurityException
- thrown if the user does not have the ability to set properties on the tableTableNotFoundException
- throw if the table no longer existsAccumuloException
-
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 interfaceTableOperations
- Parameters:
tableName
- the name of the tablename
- the name of the iteratorscopes
- the scopes of the iterator- Throws:
AccumuloSecurityException
- thrown if the user does not have the ability to set properties on the tableTableNotFoundException
- throw if the table no longer existsAccumuloException
-
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 interfaceTableOperations
- Parameters:
tableName
- the name of the tablename
- the name of the iteratorscope
- 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 tableTableNotFoundException
- throw if the table no longer existsAccumuloException
-
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 interfaceTableOperations
- Parameters:
tableName
- the name of the table- Returns:
- a set of iterator names
- Throws:
AccumuloSecurityException
AccumuloException
TableNotFoundException
-
checkIteratorConflicts
public static void checkIteratorConflicts(Map<String,String> props, IteratorSetting setting, EnumSet<IteratorUtil.IteratorScope> scopes) throws AccumuloException
- Throws:
AccumuloException
-
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 interfaceTableOperations
- Parameters:
tableName
- the name of the tablesetting
- object specifying the properties of the iterator- Throws:
AccumuloException
TableNotFoundException
-
addConstraint
public int addConstraint(String tableName, String constraintClassName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException
Description copied from interface:TableOperations
Add a new constraint to a table.- Specified by:
addConstraint
in interfaceTableOperations
- Parameters:
tableName
- the name of the tableconstraintClassName
- the full name of the constraint class- Returns:
- the unique number assigned to the constraint
- Throws:
AccumuloException
- thrown if the constraint has already been added to the table or if there are errors in the configuration of existing constraintsAccumuloSecurityException
- thrown if the user doesn't have permission to add the constraintTableNotFoundException
-
removeConstraint
public void removeConstraint(String tableName, int number) throws AccumuloException, AccumuloSecurityException
Description copied from interface:TableOperations
Remove a constraint from a table.- Specified by:
removeConstraint
in interfaceTableOperations
- Parameters:
tableName
- the name of the tablenumber
- the unique number assigned to the constraint- Throws:
AccumuloSecurityException
- thrown if the user doesn't have permission to remove the constraintAccumuloException
-
listConstraints
public Map<String,Integer> listConstraints(String tableName) throws AccumuloException, TableNotFoundException
Description copied from interface:TableOperations
List constraints on a table with their assigned numbers.- Specified by:
listConstraints
in interfaceTableOperations
- Parameters:
tableName
- the name of the table- Returns:
- a map from constraint class name to assigned number
- Throws:
AccumuloException
- thrown if there are errors in the configuration of existing constraintsTableNotFoundException
-
-