|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.accumulo.core.client.impl.NamespaceOperationsHelper org.apache.accumulo.core.client.impl.NamespaceOperationsImpl
public class NamespaceOperationsImpl
Constructor Summary | |
---|---|
NamespaceOperationsImpl(Instance instance,
Credentials credentials,
TableOperationsImpl tableOps)
|
Method Summary | |
---|---|
int |
addConstraint(String namespace,
String constraintClassName)
Add a new constraint to a namespace. |
void |
attachIterator(String namespace,
IteratorSetting setting,
EnumSet<IteratorUtil.IteratorScope> scopes)
Add an iterator to a namespace on the given scopes. |
void |
create(String namespace)
Create an empty namespace with no initial configuration. |
void |
delete(String namespace)
Delete an empty namespace |
boolean |
exists(String namespace)
A method to check if a namespace exists in Accumulo. |
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,String> |
namespaceIdMap()
Get a mapping of namespace name to internal namespace id. |
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. |
boolean |
testClassLoad(String namespace,
String className,
String asTypeName)
Test to see if the instance can load the given class as the given type. |
Methods inherited from class org.apache.accumulo.core.client.impl.NamespaceOperationsHelper |
---|
attachIterator, checkIteratorConflicts, defaultNamespace, getIteratorSetting, listConstraints, listIterators, removeConstraint, removeIterator, systemNamespace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NamespaceOperationsImpl(Instance instance, Credentials credentials, TableOperationsImpl tableOps)
Method Detail |
---|
public SortedSet<String> list()
NamespaceOperations
public boolean exists(String namespace)
NamespaceOperations
namespace
- the name of the namespace
public void create(String namespace) throws AccumuloException, AccumuloSecurityException, NamespaceExistsException
NamespaceOperations
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 existspublic void delete(String namespace) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException, NamespaceNotEmptyException
NamespaceOperations
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 tablespublic void rename(String oldNamespaceName, String newNamespaceName) throws AccumuloSecurityException, NamespaceNotFoundException, AccumuloException, NamespaceExistsException
NamespaceOperations
oldNamespaceName
- the old namespace namenewNamespaceName
- the new namespace name
AccumuloSecurityException
- if the user does not have permission
NamespaceNotFoundException
- if the old namespace does not exist
AccumuloException
- if a general error occurs
NamespaceExistsException
- if the new namespace already existspublic void setProperty(String namespace, String property, String value) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException
NamespaceOperations
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 existpublic void removeProperty(String namespace, String property) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException
NamespaceOperations
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 existpublic Iterable<Map.Entry<String,String>> getProperties(String namespace) throws AccumuloException, NamespaceNotFoundException
NamespaceOperations
namespace
- the name of the namespace
AccumuloException
- if a general error occurs
NamespaceNotFoundException
- if the specified namespace doesn't existpublic Map<String,String> namespaceIdMap()
NamespaceOperations
public boolean testClassLoad(String namespace, String className, String asTypeName) throws NamespaceNotFoundException, AccumuloException, AccumuloSecurityException
NamespaceOperations
namespace
- the name of the namespaceclassName
- the class to try to loadasTypeName
- the interface or superclass the given class is attempted to load as
NamespaceNotFoundException
- if the specified namespace doesn't exist
AccumuloException
- if a general error occurs
AccumuloSecurityException
- if the user does not have permissionpublic void attachIterator(String namespace, IteratorSetting setting, EnumSet<IteratorUtil.IteratorScope> scopes) throws AccumuloSecurityException, AccumuloException, NamespaceNotFoundException
NamespaceOperations
attachIterator
in interface NamespaceOperations
attachIterator
in class NamespaceOperationsHelper
namespace
- the name of the namespacesetting
- object specifying the properties of the iteratorscopes
- the set of scopes the iterator should apply to
AccumuloSecurityException
- if the user does not have permission
AccumuloException
- if a general error occurs
NamespaceNotFoundException
- if the specified namespace doesn't existpublic int addConstraint(String namespace, String constraintClassName) throws AccumuloException, AccumuloSecurityException, NamespaceNotFoundException
NamespaceOperations
addConstraint
in interface NamespaceOperations
addConstraint
in class NamespaceOperationsHelper
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 exist
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |