HBASE-15571 Make MasterProcedureManagerHost accessible through MasterServices
This commit is contained in:
parent
bcc4444420
commit
8c7f044efb
|
@ -334,7 +334,7 @@ public class HMaster extends HRegionServer implements MasterServices {
|
|||
// monitor for snapshot of hbase tables
|
||||
SnapshotManager snapshotManager;
|
||||
// monitor for distributed procedures
|
||||
MasterProcedureManagerHost mpmHost;
|
||||
private MasterProcedureManagerHost mpmHost;
|
||||
|
||||
// it is assigned after 'initialized' guard set to true, so should be volatile
|
||||
private volatile MasterQuotaManager quotaManager;
|
||||
|
@ -2466,6 +2466,13 @@ public class HMaster extends HRegionServer implements MasterServices {
|
|||
return this.snapshotManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the underlying MasterProcedureManagerHost
|
||||
*/
|
||||
public MasterProcedureManagerHost getMasterProcedureManagerHost() {
|
||||
return mpmHost;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClusterSchema getClusterSchema() {
|
||||
return this.clusterSchemaService;
|
||||
|
|
|
@ -641,7 +641,7 @@ public class MasterRpcServices extends RSRpcServices
|
|||
try {
|
||||
master.checkInitialized();
|
||||
ProcedureDescription desc = request.getProcedure();
|
||||
MasterProcedureManager mpm = master.mpmHost.getProcedureManager(
|
||||
MasterProcedureManager mpm = master.getMasterProcedureManagerHost().getProcedureManager(
|
||||
desc.getSignature());
|
||||
if (mpm == null) {
|
||||
throw new ServiceException("The procedure is not registered: "
|
||||
|
@ -676,7 +676,7 @@ public class MasterRpcServices extends RSRpcServices
|
|||
try {
|
||||
master.checkInitialized();
|
||||
ProcedureDescription desc = request.getProcedure();
|
||||
MasterProcedureManager mpm = master.mpmHost.getProcedureManager(
|
||||
MasterProcedureManager mpm = master.getMasterProcedureManagerHost().getProcedureManager(
|
||||
desc.getSignature());
|
||||
if (mpm == null) {
|
||||
throw new ServiceException("The procedure is not registered: "
|
||||
|
@ -894,7 +894,7 @@ public class MasterRpcServices extends RSRpcServices
|
|||
try {
|
||||
master.checkInitialized();
|
||||
ProcedureDescription desc = request.getProcedure();
|
||||
MasterProcedureManager mpm = master.mpmHost.getProcedureManager(
|
||||
MasterProcedureManager mpm = master.getMasterProcedureManagerHost().getProcedureManager(
|
||||
desc.getSignature());
|
||||
if (mpm == null) {
|
||||
throw new ServiceException("The procedure is not registered: "
|
||||
|
|
|
@ -35,6 +35,7 @@ import org.apache.hadoop.hbase.executor.ExecutorService;
|
|||
import org.apache.hadoop.hbase.master.normalizer.RegionNormalizer;
|
||||
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv;
|
||||
import org.apache.hadoop.hbase.master.snapshot.SnapshotManager;
|
||||
import org.apache.hadoop.hbase.procedure.MasterProcedureManagerHost;
|
||||
import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;
|
||||
import org.apache.hadoop.hbase.quotas.MasterQuotaManager;
|
||||
import org.apache.hadoop.hbase.security.User;
|
||||
|
@ -51,6 +52,11 @@ public interface MasterServices extends Server {
|
|||
*/
|
||||
SnapshotManager getSnapshotManager();
|
||||
|
||||
/**
|
||||
* @return the underlying MasterProcedureManagerHost
|
||||
*/
|
||||
MasterProcedureManagerHost getMasterProcedureManagerHost();
|
||||
|
||||
/**
|
||||
* @return Master's instance of {@link ClusterSchema}
|
||||
*/
|
||||
|
|
|
@ -65,6 +65,7 @@ import org.apache.hadoop.hbase.master.CatalogJanitor.SplitParentFirstComparator;
|
|||
import org.apache.hadoop.hbase.master.normalizer.RegionNormalizer;
|
||||
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv;
|
||||
import org.apache.hadoop.hbase.master.snapshot.SnapshotManager;
|
||||
import org.apache.hadoop.hbase.procedure.MasterProcedureManagerHost;
|
||||
import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;
|
||||
import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
|
||||
import org.apache.hadoop.hbase.protobuf.generated.AdminProtos;
|
||||
|
@ -248,6 +249,11 @@ public class TestCatalogJanitor {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MasterProcedureManagerHost getMasterProcedureManagerHost() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AssignmentManager getAssignmentManager() {
|
||||
return this.asm;
|
||||
|
|
Loading…
Reference in New Issue