Class MockMasterServices
java.lang.Object
org.apache.hadoop.hbase.master.MockNoopMasterServices
org.apache.hadoop.hbase.master.assignment.MockMasterServices
- All Implemented Interfaces:
org.apache.hadoop.hbase.Abortable
,org.apache.hadoop.hbase.master.MasterServices
,org.apache.hadoop.hbase.Server
,org.apache.hadoop.hbase.Stoppable
A mocked master services. Tries to fake it. May not always work.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final org.apache.hadoop.hbase.master.assignment.AssignmentManager
private final org.apache.hadoop.hbase.master.LoadBalancer
private final org.apache.hadoop.hbase.client.ClusterConnection
static final String
private final org.apache.hadoop.hbase.master.MasterFileSystem
private final org.apache.hadoop.hbase.procedure2.ProcedureEvent<?>
private final org.apache.hadoop.hbase.master.region.MasterRegion
static final org.apache.hadoop.hbase.ServerName
private org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv
private org.apache.hadoop.hbase.procedure2.ProcedureExecutor<org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv>
private org.apache.hadoop.hbase.procedure2.store.ProcedureStore
private final org.apache.hadoop.hbase.master.replication.ReplicationPeerManager
private final org.apache.hadoop.hbase.master.ServerManager
private final org.apache.hadoop.hbase.master.SplitWALManager
private final org.apache.hadoop.hbase.master.TableStateManager
private final org.apache.hadoop.hbase.master.MasterWalManager
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MultiResponse
buildMultiResponse
(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MultiRequest req) org.apache.hadoop.hbase.master.assignment.AssignmentManager
org.apache.hadoop.hbase.client.ClusterConnection
org.apache.hadoop.hbase.CoordinatedStateManager
org.apache.hadoop.hbase.procedure2.ProcedureEvent<?>
org.apache.hadoop.hbase.master.LoadBalancer
org.apache.hadoop.hbase.master.MasterFileSystem
org.apache.hadoop.hbase.procedure2.ProcedureExecutor<org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv>
org.apache.hadoop.hbase.master.MasterWalManager
org.apache.hadoop.hbase.master.replication.ReplicationPeerManager
org.apache.hadoop.hbase.master.ServerManager
org.apache.hadoop.hbase.ServerName
org.apache.hadoop.hbase.master.SplitWALManager
org.apache.hadoop.hbase.TableDescriptors
org.apache.hadoop.hbase.master.TableStateManager
boolean
void
restartRegionServer
(org.apache.hadoop.hbase.ServerName serverName) Call this restart method only after running MockMasterServices#start() The RSs can be differentiated by the port number, see ServerName in MockMasterServices#start() method above.void
start
(int numServes, org.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher remoteDispatcher) private void
startProcedureExecutor
(org.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher remoteDispatcher) void
private void
Methods inherited from class org.apache.hadoop.hbase.master.MockNoopMasterServices
abort, abortProcedure, addColumn, addReplicationPeer, checkIfShouldMoveSystemRegionAsync, checkTableModifiable, createConnection, createSystemTable, createTable, deleteColumn, deleteTable, disableReplicationPeer, disableTable, enableReplicationPeer, enableTable, executeRegionPlansWithThrottling, flushMasterStore, flushTable, getAccessChecker, getCatalogJanitor, getChoreService, getClientIdAuditPrefix, getClusterConnection, getClusterSchema, getConfiguration, getExecutorService, getFavoredNodesManager, getFileSystem, getHbckChore, getLastMajorCompactionTimestamp, getLastMajorCompactionTimestampForRegion, getLockManager, getLocks, getMasterCoprocessorHost, getMasterMetrics, getMasterProcedureManagerHost, getMasterQuotaManager, getMetaLocationSyncer, getProcedures, getRegionNormalizerManager, getRegionServerVersion, getReplicationPeerConfig, getSnapshotManager, getZKPermissionWatcher, getZooKeeper, isAborted, isActiveMaster, isClusterUp, isInMaintenanceMode, isReplicationPeerModificationEnabled, isSplitOrMergeEnabled, isStopped, isStopping, listReplicationPeers, listTableDescriptorsByNamespace, listTableNamesByNamespace, mergeRegions, modifyColumn, modifyColumnStoreFileTracker, modifyTable, modifyTable, modifyTableStoreFileTracker, normalizeRegions, registerService, removeReplicationPeer, replicationPeerModificationSwitch, runReplicationBarrierCleaner, skipRegionManagementAction, splitRegion, truncateRegion, truncateTable, updateReplicationPeerConfig
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.hadoop.hbase.Abortable
abort
-
Field Details
-
fileSystemManager
-
walManager
-
splitWALManager
-
assignmentManager
-
tableStateManager
-
masterRegion
-
procedureEnv
-
procedureExecutor
private org.apache.hadoop.hbase.procedure2.ProcedureExecutor<org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv> procedureExecutor -
procedureStore
-
connection
-
balancer
-
serverManager
-
rpm
-
initialized
-
DEFAULT_COLUMN_FAMILY_NAME
- See Also:
-
MOCK_MASTER_SERVERNAME
-
-
Constructor Details
-
MockMasterServices
public MockMasterServices(org.apache.hadoop.conf.Configuration conf) throws IOException, org.apache.hadoop.hbase.replication.ReplicationException - Throws:
IOException
org.apache.hadoop.hbase.replication.ReplicationException
-
-
Method Details
-
start
public void start(int numServes, org.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher remoteDispatcher) throws IOException, org.apache.zookeeper.KeeperException - Throws:
IOException
org.apache.zookeeper.KeeperException
-
restartRegionServer
Call this restart method only after running MockMasterServices#start() The RSs can be differentiated by the port number, see ServerName in MockMasterServices#start() method above. Restart of region server will have new startcode in server name- Parameters:
serverName
- Server name to be restarted- Throws:
IOException
-
stop
- Specified by:
stop
in interfaceorg.apache.hadoop.hbase.Stoppable
- Overrides:
stop
in classMockNoopMasterServices
-
startProcedureExecutor
private void startProcedureExecutor(org.apache.hadoop.hbase.master.procedure.RSProcedureDispatcher remoteDispatcher) throws IOException - Throws:
IOException
-
stopProcedureExecutor
-
isInitialized
- Specified by:
isInitialized
in interfaceorg.apache.hadoop.hbase.master.MasterServices
- Overrides:
isInitialized
in classMockNoopMasterServices
-
getInitializedEvent
- Specified by:
getInitializedEvent
in interfaceorg.apache.hadoop.hbase.master.MasterServices
- Overrides:
getInitializedEvent
in classMockNoopMasterServices
-
getMasterFileSystem
- Specified by:
getMasterFileSystem
in interfaceorg.apache.hadoop.hbase.master.MasterServices
- Overrides:
getMasterFileSystem
in classMockNoopMasterServices
-
getMasterWalManager
- Specified by:
getMasterWalManager
in interfaceorg.apache.hadoop.hbase.master.MasterServices
- Overrides:
getMasterWalManager
in classMockNoopMasterServices
-
getMasterProcedureExecutor
public org.apache.hadoop.hbase.procedure2.ProcedureExecutor<org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv> getMasterProcedureExecutor()- Specified by:
getMasterProcedureExecutor
in interfaceorg.apache.hadoop.hbase.master.MasterServices
- Overrides:
getMasterProcedureExecutor
in classMockNoopMasterServices
-
getLoadBalancer
- Specified by:
getLoadBalancer
in interfaceorg.apache.hadoop.hbase.master.MasterServices
- Overrides:
getLoadBalancer
in classMockNoopMasterServices
-
getServerManager
- Specified by:
getServerManager
in interfaceorg.apache.hadoop.hbase.master.MasterServices
- Overrides:
getServerManager
in classMockNoopMasterServices
-
getAssignmentManager
- Specified by:
getAssignmentManager
in interfaceorg.apache.hadoop.hbase.master.MasterServices
- Overrides:
getAssignmentManager
in classMockNoopMasterServices
-
getTableStateManager
- Specified by:
getTableStateManager
in interfaceorg.apache.hadoop.hbase.master.MasterServices
- Overrides:
getTableStateManager
in classMockNoopMasterServices
-
getConnection
- Specified by:
getConnection
in interfaceorg.apache.hadoop.hbase.Server
- Overrides:
getConnection
in classMockNoopMasterServices
-
getServerName
- Specified by:
getServerName
in interfaceorg.apache.hadoop.hbase.Server
- Overrides:
getServerName
in classMockNoopMasterServices
-
getCoordinatedStateManager
- Specified by:
getCoordinatedStateManager
in interfaceorg.apache.hadoop.hbase.Server
- Overrides:
getCoordinatedStateManager
in classMockNoopMasterServices
-
getTableDescriptors
- Specified by:
getTableDescriptors
in interfaceorg.apache.hadoop.hbase.master.MasterServices
- Overrides:
getTableDescriptors
in classMockNoopMasterServices
-
buildMultiResponse
private static org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MultiResponse buildMultiResponse(org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.MultiRequest req) -
getSplitWALManager
-
getReplicationPeerManager
public org.apache.hadoop.hbase.master.replication.ReplicationPeerManager getReplicationPeerManager()- Specified by:
getReplicationPeerManager
in interfaceorg.apache.hadoop.hbase.master.MasterServices
- Overrides:
getReplicationPeerManager
in classMockNoopMasterServices
-