|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface NamespaceOperations
Provides an API for administering namespaces All tables exist in a namespace. The default namespace has no name, and is used if an explicit namespace is not specified. Fully qualified table names look like "namespaceName.tableName". Tables in the default namespace are fully qualified simply as "tableName".
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. |
void |
create(String namespace)
Create an empty namespace with no initial configuration. |
String |
defaultNamespace()
Returns the name of the default namespace |
void |
delete(String namespace)
Delete an empty namespace |
boolean |
exists(String namespace)
A method to check if a namespace exists in Accumulo. |
IteratorSetting |
getIteratorSetting(String namespace,
String name,
IteratorUtil.IteratorScope scope)
Get the settings for an iterator. |
Iterable<Map.Entry<String,String>> |
getProperties(String namespace)
Gets properties of a namespace, which are inherited by tables in this namespace. |
SortedSet<String> |
list()
Retrieve a list of namespaces in Accumulo. |
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. |
Map<String,String> |
namespaceIdMap()
Get a mapping of namespace name to internal namespace id. |
void |
removeConstraint(String namespace,
int id)
Remove a constraint from a namespace. |
void |
removeIterator(String namespace,
String name,
EnumSet<IteratorUtil.IteratorScope> scopes)
Remove an iterator from a namespace by name. |
void |
removeProperty(String namespace,
String property)
Removes a property from a namespace. |
void |
rename(String oldNamespaceName,
String newNamespaceName)
Rename a namespace |
void |
setProperty(String namespace,
String property,
String value)
Sets a property on a namespace which applies to all tables in the namespace. |
String |
systemNamespace()
Returns the name of the system reserved namespace |
boolean |
testClassLoad(String namespace,
String className,
String asTypeName)
Test to see if the instance can load the given class as the given type. |
Method Detail |
---|
String systemNamespace()
String defaultNamespace()
SortedSet<String> list() throws AccumuloException, AccumuloSecurityException
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permissionboolean exists(String namespace) throws AccumuloException, AccumuloSecurityException
namespace
- the name of the namespace
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permissionvoid create(String namespace) throws AccumuloException, AccumuloSecurityException, NamespaceExistsException
namespace
- the name of the namespace
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permission
NamespaceExistsException
- if the specified namespace already existsvoid delete(String namespace) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, NamespaceNotEmptyException
namespace
- the name of the namespace
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permission
NamespaceNotFoundException
- if the specified namespace doesn't exist
NamespaceNotEmptyException
- if the namespaces still contains tablesvoid rename(String oldNamespaceName, String newNamespaceName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, NamespaceExistsException
oldNamespaceName
- the old namespace namenewNamespaceName
- the new namespace name
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permission
NamespaceNotFoundException
- if the old namespace does not exist
NamespaceExistsException
- if the new namespace already existsvoid setProperty(String namespace, String property, String value) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException
namespace
- the name of the namespaceproperty
- the name of a per-table propertyvalue
- the value to set a per-table property to
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permission
NamespaceNotFoundException
- if the specified namespace doesn't existvoid removeProperty(String namespace, String property) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException
namespace
- the name of the namespaceproperty
- the name of a per-table property
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permission
NamespaceNotFoundException
- if the specified namespace doesn't existIterable<Map.Entry<String,String>> getProperties(String namespace) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException
namespace
- the name of the namespace
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permission
NamespaceNotFoundException
- if the specified namespace doesn't existMap<String,String> namespaceIdMap() throws AccumuloException, AccumuloSecurityException
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permissionvoid attachIterator(String namespace, IteratorSetting setting) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException
namespace
- the name of the namespacesetting
- object specifying the properties of the iterator
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permission
NamespaceNotFoundException
- if the specified namespace doesn't existvoid attachIterator(String namespace, IteratorSetting setting, EnumSet<IteratorUtil.IteratorScope> scopes) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException
namespace
- the name of the namespacesetting
- object specifying the properties of the iteratorscopes
- the set of scopes the iterator should apply to
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permission
NamespaceNotFoundException
- if the specified namespace doesn't existvoid removeIterator(String namespace, String name, EnumSet<IteratorUtil.IteratorScope> scopes) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException
namespace
- the name of the namespacename
- the name of the iteratorscopes
- the scopes of the iterator
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permission
NamespaceNotFoundException
- if the specified namespace doesn't existIteratorSetting getIteratorSetting(String namespace, String name, IteratorUtil.IteratorScope scope) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException
namespace
- the name of the namespacename
- the name of the iteratorscope
- the scope of the iterator
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permission
NamespaceNotFoundException
- if the specified namespace doesn't existMap<String,EnumSet<IteratorUtil.IteratorScope>> listIterators(String namespace) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException
namespace
- the name of the namespace
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permission
NamespaceNotFoundException
- if the specified namespace doesn't existvoid checkIteratorConflicts(String namespace, IteratorSetting setting, EnumSet<IteratorUtil.IteratorScope> scopes) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException
namespace
- the name of the namespacesetting
- object specifying the properties of the iteratorscopes
- the scopes of the iterator
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permission
NamespaceNotFoundException
- if the specified namespace doesn't existint addConstraint(String namespace, String constraintClassName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException
namespace
- the name of the namespaceconstraintClassName
- the full name of the constraint class
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permission
NamespaceNotFoundException
- if the specified namespace doesn't existvoid removeConstraint(String namespace, int id) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException
namespace
- the name of the namespaceid
- the unique id number assigned to the constraint
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permission
NamespaceNotFoundException
- if the specified namespace doesn't existMap<String,Integer> listConstraints(String namespace) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException
namespace
- the name of the namespace
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permission
NamespaceNotFoundException
- if the specified namespace doesn't existboolean testClassLoad(String namespace, String className, String asTypeName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException
namespace
- the name of the namespaceclassName
- the class to try to loadasTypeName
- the interface or superclass the given class is attempted to load as
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permission
NamespaceNotFoundException
- if the specified namespace doesn't exist
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |