org.apache.accumulo.core.client.impl
Class NamespaceOperationsHelper

java.lang.Object
  extended by org.apache.accumulo.core.client.impl.NamespaceOperationsHelper
All Implemented Interfaces:
NamespaceOperations
Direct Known Subclasses:
NamespaceOperationsImpl

public abstract class NamespaceOperationsHelper
extends Object
implements NamespaceOperations


Constructor Summary
NamespaceOperationsHelper()
           
 
Method Summary
 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 namespace
 IteratorSetting 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
 

Constructor Detail

NamespaceOperationsHelper

public NamespaceOperationsHelper()
Method Detail

systemNamespace

public String systemNamespace()
Description copied from interface: NamespaceOperations
Returns the name of the system reserved namespace

Specified by:
systemNamespace in interface NamespaceOperations
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 interface NamespaceOperations
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 interface NamespaceOperations
Parameters:
namespace - the name of the namespace
setting - object specifying the properties of the iterator
Throws:
AccumuloSecurityException - if the user does not have permission
AccumuloException - if a general error occurs
NamespaceNotFoundException - 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 interface NamespaceOperations
Parameters:
namespace - the name of the namespace
setting - object specifying the properties of the iterator
scopes - the set of scopes the iterator should apply to
Throws:
AccumuloSecurityException - if the user does not have permission
AccumuloException - if a general error occurs
NamespaceNotFoundException - 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 interface NamespaceOperations
Parameters:
namespace - the name of the namespace
name - the name of the iterator
scopes - the scopes of the iterator
Throws:
AccumuloSecurityException - if the user does not have permission
AccumuloException - if a general error occurs
NamespaceNotFoundException - 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 interface NamespaceOperations
Parameters:
namespace - the name of the namespace
name - the name of the iterator
scope - the scope of the iterator
Returns:
the settings for this iterator
Throws:
AccumuloSecurityException - if the user does not have permission
AccumuloException - if a general error occurs
NamespaceNotFoundException - 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 interface NamespaceOperations
Parameters:
namespace - the name of the namespace
Returns:
a set of iterator names
Throws:
AccumuloSecurityException - if the user does not have permission
AccumuloException - if a general error occurs
NamespaceNotFoundException - 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 interface NamespaceOperations
Parameters:
namespace - the name of the namespace
setting - object specifying the properties of the iterator
scopes - the scopes of the iterator
Throws:
AccumuloException - if a general error occurs
NamespaceNotFoundException - if the specified namespace doesn't exist
AccumuloSecurityException - 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 interface NamespaceOperations
Parameters:
namespace - the name of the namespace
constraintClassName - the full name of the constraint class
Returns:
the unique id number assigned to the constraint
Throws:
AccumuloException - if a general error occurs
AccumuloSecurityException - if the user does not have permission
NamespaceNotFoundException - 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 interface NamespaceOperations
Parameters:
namespace - the name of the namespace
number - the unique id number assigned to the constraint
Throws:
AccumuloException - if a general error occurs
AccumuloSecurityException - if the user does not have permission
NamespaceNotFoundException - 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 interface NamespaceOperations
Parameters:
namespace - the name of the namespace
Returns:
a map from constraint class name to assigned number
Throws:
AccumuloException - if a general error occurs
NamespaceNotFoundException - if the specified namespace doesn't exist
AccumuloSecurityException - if the user does not have permission


Copyright © 2015 Apache Accumulo Project. All rights reserved.