Class NamespaceOperationsHelper
- java.lang.Object
-
- org.apache.accumulo.core.clientImpl.NamespaceOperationsHelper
-
- All Implemented Interfaces:
NamespaceOperations
- Direct Known Subclasses:
NamespaceOperationsImpl
public abstract class NamespaceOperationsHelper extends Object implements NamespaceOperations
-
-
Constructor Summary
Constructors Constructor Description NamespaceOperationsHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intaddConstraint(String namespace, String constraintClassName)Add a new constraint to a namespace.voidattachIterator(String namespace, IteratorSetting setting)Add an iterator to a namespace on all scopes.voidattachIterator(String namespace, IteratorSetting setting, EnumSet<IteratorUtil.IteratorScope> scopes)Add an iterator to a namespace on the given scopes.voidcheckIteratorConflicts(String namespace, 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.StringdefaultNamespace()Returns the name of the default namespaceIteratorSettinggetIteratorSetting(String namespace, String name, IteratorUtil.IteratorScope scope)Get the settings for an iterator.Map<String,Integer>listConstraints(String namespace)List constraints on a namespace with their assigned numbers.Map<String,EnumSet<IteratorUtil.IteratorScope>>listIterators(String namespace)Get a list of iterators for this namespace.voidremoveConstraint(String namespace, int number)Remove a constraint from a namespace.voidremoveIterator(String namespace, String name, EnumSet<IteratorUtil.IteratorScope> scopes)Remove an iterator from a namespace by name.StringsystemNamespace()Returns the name of the system reserved namespace-
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.NamespaceOperations
create, delete, exists, getProperties, list, namespaceIdMap, removeProperty, rename, setProperty, testClassLoad
-
-
-
-
Method Detail
-
systemNamespace
public String systemNamespace()
Description copied from interface:NamespaceOperationsReturns the name of the system reserved namespace- Specified by:
systemNamespacein interfaceNamespaceOperations- Returns:
- the name of the system namespace
-
defaultNamespace
public String defaultNamespace()
Description copied from interface:NamespaceOperationsReturns the name of the default namespace- Specified by:
defaultNamespacein interfaceNamespaceOperations- Returns:
- the name of the default namespace
-
attachIterator
public void attachIterator(String namespace, IteratorSetting setting) throws AccumuloSecurityException, AccumuloException, NamespaceNotFoundException
Description copied from interface:NamespaceOperationsAdd an iterator to a namespace on all scopes.- Specified by:
attachIteratorin interfaceNamespaceOperations- Parameters:
namespace- the name of the namespacesetting- object specifying the properties of the iterator- Throws:
AccumuloSecurityException- if the user does not have permissionAccumuloException- if a general error occursNamespaceNotFoundException- if the specified namespace doesn't exist
-
attachIterator
public void attachIterator(String namespace, IteratorSetting setting, EnumSet<IteratorUtil.IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException, NamespaceNotFoundException
Description copied from interface:NamespaceOperationsAdd an iterator to a namespace on the given scopes.- Specified by:
attachIteratorin interfaceNamespaceOperations- Parameters:
namespace- the name of the namespacesetting- object specifying the properties of the iteratorscopes- the set of scopes the iterator should apply to- Throws:
AccumuloSecurityException- if the user does not have permissionAccumuloException- if a general error occursNamespaceNotFoundException- if the specified namespace doesn't exist
-
removeIterator
public void removeIterator(String namespace, String name, EnumSet<IteratorUtil.IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException, NamespaceNotFoundException
Description copied from interface:NamespaceOperationsRemove an iterator from a namespace by name.- Specified by:
removeIteratorin interfaceNamespaceOperations- Parameters:
namespace- the name of the namespacename- the name of the iteratorscopes- the scopes of the iterator- Throws:
AccumuloSecurityException- if the user does not have permissionAccumuloException- if a general error occursNamespaceNotFoundException- if the specified namespace doesn't exist
-
getIteratorSetting
public IteratorSetting getIteratorSetting(String namespace, String name, IteratorUtil.IteratorScope scope) throws AccumuloSecurityException, AccumuloException, NamespaceNotFoundException
Description copied from interface:NamespaceOperationsGet the settings for an iterator.- Specified by:
getIteratorSettingin interfaceNamespaceOperations- Parameters:
namespace- the name of the namespacename- the name of the iteratorscope- the scope of the iterator- Returns:
- the settings for this iterator
- Throws:
AccumuloSecurityException- if the user does not have permissionAccumuloException- if a general error occursNamespaceNotFoundException- if the specified namespace doesn't exist
-
listIterators
public Map<String,EnumSet<IteratorUtil.IteratorScope>> listIterators(String namespace) throws AccumuloSecurityException, AccumuloException, NamespaceNotFoundException
Description copied from interface:NamespaceOperationsGet a list of iterators for this namespace.- Specified by:
listIteratorsin interfaceNamespaceOperations- Parameters:
namespace- the name of the namespace- Returns:
- a set of iterator names
- Throws:
AccumuloSecurityException- if the user does not have permissionAccumuloException- if a general error occursNamespaceNotFoundException- if the specified namespace doesn't exist
-
checkIteratorConflicts
public void checkIteratorConflicts(String namespace, IteratorSetting setting, EnumSet<IteratorUtil.IteratorScope> scopes) throws AccumuloException, NamespaceNotFoundException, AccumuloSecurityException
Description copied from interface:NamespaceOperationsCheck 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. If so, an IllegalArgumentException is thrown, wrapped in an AccumuloException.- Specified by:
checkIteratorConflictsin interfaceNamespaceOperations- Parameters:
namespace- the name of the namespacesetting- object specifying the properties of the iteratorscopes- the scopes of the iterator- Throws:
AccumuloException- if a general error occursNamespaceNotFoundException- if the specified namespace doesn't existAccumuloSecurityException- if the user does not have permission
-
addConstraint
public int addConstraint(String namespace, String constraintClassName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException
Description copied from interface:NamespaceOperationsAdd a new constraint to a namespace.- Specified by:
addConstraintin interfaceNamespaceOperations- Parameters:
namespace- the name of the namespaceconstraintClassName- the full name of the constraint class- Returns:
- the unique id number assigned to the constraint
- Throws:
AccumuloException- if a general error occursAccumuloSecurityException- if the user does not have permissionNamespaceNotFoundException- if the specified namespace doesn't exist
-
removeConstraint
public void removeConstraint(String namespace, int number) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException
Description copied from interface:NamespaceOperationsRemove a constraint from a namespace.- Specified by:
removeConstraintin interfaceNamespaceOperations- Parameters:
namespace- the name of the namespacenumber- the unique id number assigned to the constraint- Throws:
AccumuloException- if a general error occursAccumuloSecurityException- if the user does not have permissionNamespaceNotFoundException- if the specified namespace doesn't exist
-
listConstraints
public Map<String,Integer> listConstraints(String namespace) throws AccumuloException, NamespaceNotFoundException, AccumuloSecurityException
Description copied from interface:NamespaceOperationsList constraints on a namespace with their assigned numbers.- Specified by:
listConstraintsin interfaceNamespaceOperations- Parameters:
namespace- the name of the namespace- Returns:
- a map from constraint class name to assigned number
- Throws:
AccumuloException- if a general error occursNamespaceNotFoundException- if the specified namespace doesn't existAccumuloSecurityException- if the user does not have permission
-
-