Package org.apache.hadoop.hbase.master
Class ClusterSchemaServiceImpl
java.lang.Object
org.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractService
org.apache.hadoop.hbase.master.ClusterSchemaServiceImpl
- All Implemented Interfaces:
ClusterSchema,ClusterSchemaService,org.apache.hbase.thirdparty.com.google.common.util.concurrent.Service
@Private
class ClusterSchemaServiceImpl
extends org.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractService
implements ClusterSchemaService
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hbase.thirdparty.com.google.common.util.concurrent.Service
org.apache.hbase.thirdparty.com.google.common.util.concurrent.Service.Listener, org.apache.hbase.thirdparty.com.google.common.util.concurrent.Service.State -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MasterServicesprivate final TableNamespaceManagerFields inherited from interface org.apache.hadoop.hbase.master.ClusterSchema
DEFAULT_HBASE_MASTER_CLUSTER_SCHEMA_OPERATION_TIMEOUT, HBASE_MASTER_CLUSTER_SCHEMA_OPERATION_TIMEOUT_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidlongcreateNamespace(NamespaceDescriptor namespaceDescriptor, NonceKey nonceKey, ProcedurePrepareLatch latch) Create a new Namespace.longdeleteNamespace(String name, NonceKey nonceKey, ProcedurePrepareLatch latch) Delete an existing Namespace.protected voiddoStart()protected voiddoStop()getNamespace(String name) Get a NamespaceGet all NamespacesFor internals use only.longmodifyNamespace(NamespaceDescriptor namespaceDescriptor, NonceKey nonceKey, ProcedurePrepareLatch latch) Modify an existing Namespace.private longsubmitProcedure(Procedure<MasterProcedureEnv> procedure, NonceKey nonceKey) Methods inherited from class org.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractService
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, doCancelStart, failureCause, isRunning, notifyFailed, notifyStarted, notifyStopped, startAsync, state, stopAsync, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hbase.thirdparty.com.google.common.util.concurrent.Service
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync
-
Field Details
-
tableNamespaceManager
-
masterServices
-
-
Constructor Details
-
ClusterSchemaServiceImpl
ClusterSchemaServiceImpl(MasterServices masterServices)
-
-
Method Details
-
checkIsRunning
- Throws:
ServiceNotRunningException
-
doStart
- Specified by:
doStartin classorg.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractService
-
doStop
- Specified by:
doStopin classorg.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractService
-
getTableNamespaceManager
Description copied from interface:ClusterSchemaFor internals use only. Do not use! Provisionally part of this Interface. Prefer the high-level APIs available elsewhere in this API.- Specified by:
getTableNamespaceManagerin interfaceClusterSchema- Returns:
- Instance of
TableNamespaceManager
-
submitProcedure
private long submitProcedure(Procedure<MasterProcedureEnv> procedure, NonceKey nonceKey) throws ServiceNotRunningException - Throws:
ServiceNotRunningException
-
createNamespace
public long createNamespace(NamespaceDescriptor namespaceDescriptor, NonceKey nonceKey, ProcedurePrepareLatch latch) throws IOException Description copied from interface:ClusterSchemaCreate a new Namespace.- Specified by:
createNamespacein interfaceClusterSchema- 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
public long modifyNamespace(NamespaceDescriptor namespaceDescriptor, NonceKey nonceKey, ProcedurePrepareLatch latch) throws IOException Description copied from interface:ClusterSchemaModify an existing Namespace.- Specified by:
modifyNamespacein interfaceClusterSchemanonceKey- 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
public long deleteNamespace(String name, NonceKey nonceKey, ProcedurePrepareLatch latch) throws IOException Description copied from interface:ClusterSchemaDelete an existing Namespace. Only empty Namespaces (no tables) can be removed.- Specified by:
deleteNamespacein interfaceClusterSchemanonceKey- 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
Description copied from interface:ClusterSchemaGet a Namespace- Specified by:
getNamespacein interfaceClusterSchema- Parameters:
name- Name of the Namespace- Returns:
- Namespace descriptor for
name - Throws:
IOException- if namespace does not exist
-
getNamespaces
Description copied from interface:ClusterSchemaGet all Namespaces- Specified by:
getNamespacesin interfaceClusterSchema- Returns:
- All Namespace descriptors
- Throws:
IOException
-