public abstract class TableOperationsHelper extends Object implements TableOperations
TableOperations.ImportDestinationArguments, TableOperations.ImportMappingOptions, TableOperations.ImportOptions
Constructor and Description |
---|
TableOperationsHelper() |
Modifier and Type | Method and 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.
|
static void |
checkIteratorConflicts(Map<String,String> props,
IteratorSetting setting,
EnumSet<IteratorUtil.IteratorScope> 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,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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addSplits, addSummarizers, cancelCompaction, clearLocatorCache, clearSamplerConfiguration, clone, compact, compact, compact, create, create, create, create, delete, deleteRows, exists, exportTable, flush, flush, getDiskUsage, getLocalityGroups, getMaxRow, getProperties, getSamplerConfiguration, getSplits, getSplits, importDirectory, importDirectory, importTable, list, listSplits, listSplits, listSummarizers, locate, merge, offline, offline, online, online, removeProperty, removeSummarizers, rename, setLocalityGroups, setProperty, setSamplerConfiguration, splitRangeByTablets, summaries, tableIdMap, testClassLoad
public void attachIterator(String tableName, IteratorSetting setting) throws AccumuloSecurityException, AccumuloException, TableNotFoundException
TableOperations
attachIterator
in interface TableOperations
tableName
- the name of the tablesetting
- object specifying the properties of the iteratorAccumuloSecurityException
- thrown if the user does not have the ability to set properties on the tableTableNotFoundException
- throw if the table no longer existsAccumuloException
public void attachIterator(String tableName, IteratorSetting setting, EnumSet<IteratorUtil.IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException, TableNotFoundException
TableOperations
attachIterator
in interface TableOperations
tableName
- the name of the tablesetting
- object specifying the properties of the iteratorAccumuloSecurityException
- thrown if the user does not have the ability to set properties on the tableTableNotFoundException
- throw if the table no longer existsAccumuloException
public void removeIterator(String tableName, String name, EnumSet<IteratorUtil.IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException, TableNotFoundException
TableOperations
removeIterator
in interface TableOperations
tableName
- the name of the tablename
- the name of the iteratorscopes
- the scopes of the iteratorAccumuloSecurityException
- thrown if the user does not have the ability to set properties on the tableTableNotFoundException
- throw if the table no longer existsAccumuloException
public IteratorSetting getIteratorSetting(String tableName, String name, IteratorUtil.IteratorScope scope) throws AccumuloSecurityException, AccumuloException, TableNotFoundException
TableOperations
getIteratorSetting
in interface TableOperations
tableName
- the name of the tablename
- the name of the iteratorscope
- the scope of the iteratorAccumuloSecurityException
- thrown if the user does not have the ability to set properties on the tableTableNotFoundException
- throw if the table no longer existsAccumuloException
public Map<String,EnumSet<IteratorUtil.IteratorScope>> listIterators(String tableName) throws AccumuloSecurityException, AccumuloException, TableNotFoundException
TableOperations
listIterators
in interface TableOperations
tableName
- the name of the tableAccumuloSecurityException
AccumuloException
TableNotFoundException
public static void checkIteratorConflicts(Map<String,String> props, IteratorSetting setting, EnumSet<IteratorUtil.IteratorScope> scopes) throws AccumuloException
AccumuloException
public void checkIteratorConflicts(String tableName, IteratorSetting setting, EnumSet<IteratorUtil.IteratorScope> scopes) throws AccumuloException, TableNotFoundException
TableOperations
checkIteratorConflicts
in interface TableOperations
tableName
- the name of the tablesetting
- object specifying the properties of the iteratorAccumuloException
TableNotFoundException
public int addConstraint(String tableName, String constraintClassName) throws AccumuloException, AccumuloSecurityException, TableNotFoundException
TableOperations
addConstraint
in interface TableOperations
tableName
- the name of the tableconstraintClassName
- the full name of the constraint classAccumuloException
- 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
public void removeConstraint(String tableName, int number) throws AccumuloException, AccumuloSecurityException
TableOperations
removeConstraint
in interface TableOperations
tableName
- the name of the tablenumber
- the unique number assigned to the constraintAccumuloSecurityException
- thrown if the user doesn't have permission to remove the constraintAccumuloException
public Map<String,Integer> listConstraints(String tableName) throws AccumuloException, TableNotFoundException
TableOperations
listConstraints
in interface TableOperations
tableName
- the name of the tableAccumuloException
- thrown if there are errors in the configuration of existing constraintsTableNotFoundException
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.