@InterfaceAudience.Private @InterfaceStability.Evolving public abstract class MasterProcedureManager extends ProcedureManager implements Stoppable
MasterProcedureManager and RegionServerProcedureManager. Implementation of
MasterProcedureManager is loaded into HMaster
process via configuration parameter 'hbase.procedure.master.classes', while implementation of
RegionServerProcedureManager is loaded into
HRegionServer process via
configuration parameter 'hbase.procedure.regionserver.classes'.
An example of globally barriered procedure implementation is
SnapshotManager and
RegionServerSnapshotManager.
A globally barriered procedure is identified by its signature (usually it is the name of the
procedure znode). During the initialization phase, the initialize methods are called by both
HMaster and
HRegionServer witch create the procedure znode
and register the listeners. A procedure can be triggered by its signature and an instant name
(encapsulated in a HBaseProtos.ProcedureDescription object). When the servers are shutdown,
the stop methods on both classes are called to clean up the data associated with the procedure.| Constructor and Description |
|---|
MasterProcedureManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
execProcedure(HBaseProtos.ProcedureDescription desc)
Execute a distributed procedure on cluster
|
byte[] |
execProcedureWithRet(HBaseProtos.ProcedureDescription desc)
Execute a distributed procedure on cluster with return data.
|
abstract void |
initialize(MasterServices master,
MetricsMaster metricsMaster)
Initialize a globally barriered procedure for master.
|
abstract boolean |
isProcedureDone(HBaseProtos.ProcedureDescription desc)
Check if the procedure is finished successfully
|
equals, getProcedureSignature, hashCodepublic abstract void initialize(MasterServices master, MetricsMaster metricsMaster) throws KeeperException, java.io.IOException, java.lang.UnsupportedOperationException
master - Master service interfaceKeeperExceptionjava.io.IOExceptionjava.lang.UnsupportedOperationExceptionpublic void execProcedure(HBaseProtos.ProcedureDescription desc) throws java.io.IOException
desc - Procedure descriptionjava.io.IOExceptionpublic byte[] execProcedureWithRet(HBaseProtos.ProcedureDescription desc) throws java.io.IOException
desc - Procedure descriptionjava.io.IOExceptionpublic abstract boolean isProcedureDone(HBaseProtos.ProcedureDescription desc) throws java.io.IOException
desc - Procedure descriptionjava.io.IOException