Package org.apache.hadoop.hbase.master
Interface ClusterSchema
- All Known Subinterfaces:
ClusterSchemaService
- All Known Implementing Classes:
ClusterSchemaServiceImpl
View and edit the current cluster schema. Use this API making any modification to namespaces,
tables, etc.
Implementation Notes
Nonces are for when operation is non-idempotent to ensure once-only semantic, even across process failures.-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Default operation timeout in milliseconds.static final String
Timeout for cluster operations in milliseconds. -
Method Summary
Modifier and TypeMethodDescriptionlong
createNamespace
(NamespaceDescriptor namespaceDescriptor, NonceKey nonceKey, ProcedurePrepareLatch latch) Create a new Namespace.long
deleteNamespace
(String name, NonceKey nonceKey, ProcedurePrepareLatch latch) Delete an existing Namespace.getNamespace
(String name) Get a NamespaceGet all NamespacesFor internals use only.long
modifyNamespace
(NamespaceDescriptor descriptor, NonceKey nonceKey, ProcedurePrepareLatch latch) Modify an existing Namespace.
-
Field Details
-
HBASE_MASTER_CLUSTER_SCHEMA_OPERATION_TIMEOUT_KEY
Timeout for cluster operations in milliseconds.- See Also:
-
DEFAULT_HBASE_MASTER_CLUSTER_SCHEMA_OPERATION_TIMEOUT
Default operation timeout in milliseconds.- See Also:
-
-
Method Details
-
getTableNamespaceManager
For internals use only. Do not use! Provisionally part of this Interface. Prefer the high-level APIs available elsewhere in this API.- Returns:
- Instance of
TableNamespaceManager
-
createNamespace
long createNamespace(NamespaceDescriptor namespaceDescriptor, NonceKey nonceKey, ProcedurePrepareLatch latch) throws IOException Create a new Namespace.- Parameters:
namespaceDescriptor
- descriptor for new NamespacenonceKey
- A unique identifier for this operation from the client or process.latch
- A latch to block on for precondition validation- Returns:
- procedure id
- Throws:
IOException
- if service is not running seeServiceNotRunningException
-
modifyNamespace
long modifyNamespace(NamespaceDescriptor descriptor, NonceKey nonceKey, ProcedurePrepareLatch latch) throws IOException Modify an existing Namespace.- Parameters:
nonceKey
- A unique identifier for this operation from the client or process.latch
- A latch to block on for precondition validation- Returns:
- procedure id
- Throws:
IOException
- if service is not running seeServiceNotRunningException
-
deleteNamespace
long deleteNamespace(String name, NonceKey nonceKey, ProcedurePrepareLatch latch) throws IOException Delete an existing Namespace. Only empty Namespaces (no tables) can be removed.- Parameters:
nonceKey
- A unique identifier for this operation from the client or process.latch
- A latch to block on for precondition validation- Returns:
- procedure id
- Throws:
IOException
- if service is not running seeServiceNotRunningException
-
getNamespace
Get a Namespace- Parameters:
name
- Name of the Namespace- Returns:
- Namespace descriptor for
name
- Throws:
IOException
- if namespace does not exist
-
getNamespaces
Get all Namespaces- Returns:
- All Namespace descriptors
- Throws:
IOException
-