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 int
addConstraint(String namespace, String constraintClassName)
Add a new constraint to a namespace.void
attachIterator(String namespace, IteratorSetting setting)
Add an iterator to a namespace on all scopes.void
attachIterator(String namespace, IteratorSetting setting, EnumSet<IteratorUtil.IteratorScope> scopes)
Add an iterator to a namespace on the given scopes.void
checkIteratorConflicts(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.String
defaultNamespace()
Returns the name of the default namespaceIteratorSetting
getIteratorSetting(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.void
removeConstraint(String namespace, int number)
Remove a constraint from a namespace.void
removeIterator(String namespace, String name, EnumSet<IteratorUtil.IteratorScope> scopes)
Remove an iterator from a namespace by name.String
systemNamespace()
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:NamespaceOperations
Returns the name of the system reserved namespace- Specified by:
systemNamespace
in interfaceNamespaceOperations
- Returns:
- the name of the system namespace
-
defaultNamespace
public String defaultNamespace()
Description copied from interface:NamespaceOperations
Returns the name of the default namespace- Specified by:
defaultNamespace
in interfaceNamespaceOperations
- Returns:
- the name of the default namespace
-
attachIterator
public void attachIterator(String namespace, IteratorSetting setting) throws AccumuloSecurityException, AccumuloException, NamespaceNotFoundException
Description copied from interface:NamespaceOperations
Add an iterator to a namespace on all scopes.- Specified by:
attachIterator
in 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:NamespaceOperations
Add an iterator to a namespace on the given scopes.- Specified by:
attachIterator
in 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:NamespaceOperations
Remove an iterator from a namespace by name.- Specified by:
removeIterator
in 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:NamespaceOperations
Get the settings for an iterator.- Specified by:
getIteratorSetting
in 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:NamespaceOperations
Get a list of iterators for this namespace.- Specified by:
listIterators
in 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:NamespaceOperations
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. If so, an IllegalArgumentException is thrown, wrapped in an AccumuloException.- Specified by:
checkIteratorConflicts
in 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:NamespaceOperations
Add a new constraint to a namespace.- Specified by:
addConstraint
in 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:NamespaceOperations
Remove a constraint from a namespace.- Specified by:
removeConstraint
in 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:NamespaceOperations
List constraints on a namespace with their assigned numbers.- Specified by:
listConstraints
in 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
-
-