Class Namespaces
- java.lang.Object
-
- org.apache.accumulo.core.clientImpl.Namespaces
-
public class Namespaces extends Object
-
-
Constructor Summary
Constructors Constructor Description Namespaces()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
exists(ClientContext context, NamespaceId namespaceId)
static SortedMap<NamespaceId,String>
getIdToNameMap(ClientContext context)
Return sorted map with key = ID, value = namespaceNamestatic NamespaceId
getNamespaceId(ClientContext context, String namespaceName)
Look for namespace ID in ZK.static String
getNamespaceName(ClientContext context, NamespaceId namespaceId)
Look for namespace name in ZK.static SortedMap<String,NamespaceId>
getNameToIdMap(ClientContext context)
Return sorted map with key = namespaceName, value = IDstatic List<TableId>
getTableIds(ClientContext context, NamespaceId namespaceId)
static List<String>
getTableNames(ClientContext context, NamespaceId namespaceId)
static NamespaceId
lookupNamespaceId(ClientContext context, String namespaceName)
Look for namespace ID in ZK.static boolean
namespaceNameExists(ClientContext context, String namespaceName)
Return true if namespace name exists
-
-
-
Method Detail
-
exists
public static boolean exists(ClientContext context, NamespaceId namespaceId)
-
getTableIds
public static List<TableId> getTableIds(ClientContext context, NamespaceId namespaceId) throws NamespaceNotFoundException
- Throws:
NamespaceNotFoundException
-
getTableNames
public static List<String> getTableNames(ClientContext context, NamespaceId namespaceId) throws NamespaceNotFoundException
- Throws:
NamespaceNotFoundException
-
getIdToNameMap
public static SortedMap<NamespaceId,String> getIdToNameMap(ClientContext context)
Return sorted map with key = ID, value = namespaceName
-
getNameToIdMap
public static SortedMap<String,NamespaceId> getNameToIdMap(ClientContext context)
Return sorted map with key = namespaceName, value = ID
-
getNamespaceId
public static NamespaceId getNamespaceId(ClientContext context, String namespaceName) throws NamespaceNotFoundException
Look for namespace ID in ZK. Throw NamespaceNotFoundException if not found.- Throws:
NamespaceNotFoundException
-
lookupNamespaceId
public static NamespaceId lookupNamespaceId(ClientContext context, String namespaceName)
Look for namespace ID in ZK. Fail quietly by logging and returning null.
-
namespaceNameExists
public static boolean namespaceNameExists(ClientContext context, String namespaceName)
Return true if namespace name exists
-
getNamespaceName
public static String getNamespaceName(ClientContext context, NamespaceId namespaceId) throws NamespaceNotFoundException
Look for namespace name in ZK. Throw NamespaceNotFoundException if not found.- Throws:
NamespaceNotFoundException
-
-