Package org.apache.hadoop.hbase
Class MockRegionServerServices
java.lang.Object
org.apache.hadoop.hbase.MockRegionServerServices
- All Implemented Interfaces:
org.apache.hadoop.hbase.Abortable
,org.apache.hadoop.hbase.regionserver.FavoredNodesForRegion
,org.apache.hadoop.hbase.regionserver.MutableOnlineRegions
,org.apache.hadoop.hbase.regionserver.OnlineRegions
,org.apache.hadoop.hbase.regionserver.RegionServerServices
,org.apache.hadoop.hbase.Server
,org.apache.hadoop.hbase.Stoppable
public class MockRegionServerServices
extends Object
implements org.apache.hadoop.hbase.regionserver.RegionServerServices
Basic mock region server services. Should only be instantiated by HBaseTestingUtility.b
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.regionserver.RegionServerServices
org.apache.hadoop.hbase.regionserver.RegionServerServices.PostOpenDeployContext, org.apache.hadoop.hbase.regionserver.RegionServerServices.RegionStateTransitionContext
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private final org.apache.hadoop.conf.Configuration
private org.apache.hadoop.hbase.fs.HFileSystem
protected static final org.slf4j.Logger
private final ConcurrentSkipListMap<byte[],
Boolean> private org.apache.hadoop.hbase.ipc.RpcServerInterface
private final AtomicBoolean
private org.apache.hadoop.hbase.ServerName
private boolean
private org.apache.hadoop.hbase.zookeeper.ZKWatcher
-
Constructor Summary
ConstructorDescriptionMockRegionServerServices
(org.apache.hadoop.conf.Configuration conf) MockRegionServerServices
(org.apache.hadoop.hbase.zookeeper.ZKWatcher zkw) MockRegionServerServices
(org.apache.hadoop.hbase.zookeeper.ZKWatcher zkw, org.apache.hadoop.hbase.ServerName serverName) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addRegion
(org.apache.hadoop.hbase.regionserver.HRegion r) org.apache.hadoop.hbase.client.Connection
createConnection
(org.apache.hadoop.conf.Configuration conf) org.apache.hadoop.hbase.security.access.AccessChecker
Optional<org.apache.hadoop.hbase.io.hfile.BlockCache>
org.apache.hadoop.hbase.ChoreService
org.apache.hadoop.hbase.client.ClusterConnection
double
org.apache.hadoop.hbase.regionserver.compactions.CompactionRequester
org.apache.hadoop.conf.Configuration
org.apache.hadoop.hbase.client.ClusterConnection
org.apache.hadoop.hbase.CoordinatedStateManager
org.apache.hadoop.hbase.executor.ExecutorService
getFavoredNodesForRegion
(String encodedRegionName) org.apache.hadoop.hbase.fs.HFileSystem
double
org.apache.hadoop.hbase.regionserver.FlushRequester
org.apache.hadoop.hbase.regionserver.throttle.ThroughputController
org.apache.hadoop.hbase.regionserver.HeapMemoryManager
org.apache.hadoop.hbase.regionserver.LeaseManager
org.apache.hadoop.hbase.regionserver.MetricsRegionServer
Optional<org.apache.hadoop.hbase.mob.MobFileCache>
org.apache.hadoop.hbase.regionserver.ServerNonceManager
org.apache.hadoop.hbase.regionserver.Region
List<org.apache.hadoop.hbase.regionserver.Region>
List<org.apache.hadoop.hbase.regionserver.Region>
getRegions
(org.apache.hadoop.hbase.TableName tableName) org.apache.hadoop.hbase.regionserver.RegionServerAccounting
org.apache.hadoop.hbase.quotas.RegionServerRpcQuotaManager
org.apache.hadoop.hbase.quotas.RegionServerSpaceQuotaManager
ConcurrentSkipListMap<byte[],
Boolean> org.apache.hadoop.hbase.ipc.RpcServerInterface
org.apache.hadoop.hbase.regionserver.SecureBulkLoadManager
org.apache.hadoop.hbase.ServerName
org.apache.hadoop.hbase.TableDescriptors
org.apache.hadoop.hbase.wal.WAL
getWAL
(org.apache.hadoop.hbase.client.RegionInfo regionInfo) List<org.apache.hadoop.hbase.wal.WAL>
getWALs()
org.apache.hadoop.hbase.security.access.ZKPermissionWatcher
org.apache.hadoop.hbase.zookeeper.ZKWatcher
boolean
boolean
boolean
boolean
void
postOpenDeployTasks
(org.apache.hadoop.hbase.regionserver.RegionServerServices.PostOpenDeployContext context) org.apache.hadoop.hbase.client.locking.EntityLock
regionLock
(List<org.apache.hadoop.hbase.client.RegionInfo> regionInfos, String description, org.apache.hadoop.hbase.Abortable abort) boolean
registerService
(com.google.protobuf.Service service) boolean
removeRegion
(org.apache.hadoop.hbase.regionserver.HRegion r, org.apache.hadoop.hbase.ServerName destination) boolean
reportFileArchivalForQuotas
(org.apache.hadoop.hbase.TableName tableName, Collection<Map.Entry<String, Long>> archivedFiles) boolean
reportRegionSizesForQuotas
(org.apache.hadoop.hbase.quotas.RegionSizeStore sizeStore) boolean
reportRegionStateTransition
(org.apache.hadoop.hbase.regionserver.RegionServerServices.RegionStateTransitionContext context) void
setFileSystem
(org.apache.hadoop.fs.FileSystem hfs) void
setRpcServer
(org.apache.hadoop.hbase.ipc.RpcServerInterface rpc) void
void
unassign
(byte[] regionName) void
updateRegionFavoredNodesMapping
(String encodedRegionName, List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ServerName> favoredNodes) 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
-
LOG
-
regions
-
rit
-
hfs
-
conf
-
zkw
-
serverName
-
rpcServer
-
abortRequested
-
stopping
-
running
-
-
Constructor Details
-
MockRegionServerServices
MockRegionServerServices(org.apache.hadoop.hbase.zookeeper.ZKWatcher zkw) -
MockRegionServerServices
MockRegionServerServices(org.apache.hadoop.hbase.zookeeper.ZKWatcher zkw, org.apache.hadoop.hbase.ServerName serverName) -
MockRegionServerServices
-
MockRegionServerServices
-
-
Method Details
-
removeRegion
public boolean removeRegion(org.apache.hadoop.hbase.regionserver.HRegion r, org.apache.hadoop.hbase.ServerName destination) - Specified by:
removeRegion
in interfaceorg.apache.hadoop.hbase.regionserver.MutableOnlineRegions
-
getRegion
- Specified by:
getRegion
in interfaceorg.apache.hadoop.hbase.regionserver.OnlineRegions
-
getRegions
public List<org.apache.hadoop.hbase.regionserver.Region> getRegions(org.apache.hadoop.hbase.TableName tableName) throws IOException - Specified by:
getRegions
in interfaceorg.apache.hadoop.hbase.regionserver.OnlineRegions
- Throws:
IOException
-
getRegions
- Specified by:
getRegions
in interfaceorg.apache.hadoop.hbase.regionserver.OnlineRegions
-
addRegion
- Specified by:
addRegion
in interfaceorg.apache.hadoop.hbase.regionserver.MutableOnlineRegions
-
postOpenDeployTasks
public void postOpenDeployTasks(org.apache.hadoop.hbase.regionserver.RegionServerServices.PostOpenDeployContext context) throws IOException - Specified by:
postOpenDeployTasks
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
- Throws:
IOException
-
isStopping
- Specified by:
isStopping
in interfaceorg.apache.hadoop.hbase.Server
-
getRpcServer
- Specified by:
getRpcServer
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
setRpcServer
-
getRegionsInTransitionInRS
- Specified by:
getRegionsInTransitionInRS
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
getFlushRequester
- Specified by:
getFlushRequester
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
getCompactionRequestor
public org.apache.hadoop.hbase.regionserver.compactions.CompactionRequester getCompactionRequestor()- Specified by:
getCompactionRequestor
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
getConnection
- Specified by:
getConnection
in interfaceorg.apache.hadoop.hbase.Server
-
getZooKeeper
- Specified by:
getZooKeeper
in interfaceorg.apache.hadoop.hbase.Server
-
getCoordinatedStateManager
- Specified by:
getCoordinatedStateManager
in interfaceorg.apache.hadoop.hbase.Server
-
getRegionServerAccounting
- Specified by:
getRegionServerAccounting
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
getRegionServerRpcQuotaManager
- Specified by:
getRegionServerRpcQuotaManager
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
getServerName
- Specified by:
getServerName
in interfaceorg.apache.hadoop.hbase.Server
-
getConfiguration
- Specified by:
getConfiguration
in interfaceorg.apache.hadoop.hbase.Server
-
abort
- Specified by:
abort
in interfaceorg.apache.hadoop.hbase.Abortable
-
stop
- Specified by:
stop
in interfaceorg.apache.hadoop.hbase.Stoppable
-
isStopped
- Specified by:
isStopped
in interfaceorg.apache.hadoop.hbase.Stoppable
-
isAborted
- Specified by:
isAborted
in interfaceorg.apache.hadoop.hbase.Abortable
-
getFileSystem
- Specified by:
getFileSystem
in interfaceorg.apache.hadoop.hbase.Server
-
setFileSystem
-
getLeaseManager
- Specified by:
getLeaseManager
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
getWALs
- Specified by:
getWALs
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
- Throws:
IOException
-
getWAL
public org.apache.hadoop.hbase.wal.WAL getWAL(org.apache.hadoop.hbase.client.RegionInfo regionInfo) throws IOException - Specified by:
getWAL
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
- Throws:
IOException
-
getExecutorService
- Specified by:
getExecutorService
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
getChoreService
- Specified by:
getChoreService
in interfaceorg.apache.hadoop.hbase.Server
-
updateRegionFavoredNodesMapping
public void updateRegionFavoredNodesMapping(String encodedRegionName, List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ServerName> favoredNodes) - Specified by:
updateRegionFavoredNodesMapping
in interfaceorg.apache.hadoop.hbase.regionserver.FavoredNodesForRegion
-
getFavoredNodesForRegion
- Specified by:
getFavoredNodesForRegion
in interfaceorg.apache.hadoop.hbase.regionserver.FavoredNodesForRegion
-
getNonceManager
- Specified by:
getNonceManager
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
reportRegionStateTransition
public boolean reportRegionStateTransition(org.apache.hadoop.hbase.regionserver.RegionServerServices.RegionStateTransitionContext context) - Specified by:
reportRegionStateTransition
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
registerService
- Specified by:
registerService
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
getHeapMemoryManager
- Specified by:
getHeapMemoryManager
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
getCompactionPressure
- Specified by:
getCompactionPressure
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
getClusterConnection
- Specified by:
getClusterConnection
in interfaceorg.apache.hadoop.hbase.Server
-
getFlushThroughputController
public org.apache.hadoop.hbase.regionserver.throttle.ThroughputController getFlushThroughputController()- Specified by:
getFlushThroughputController
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
getFlushPressure
- Specified by:
getFlushPressure
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
getMetrics
- Specified by:
getMetrics
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
regionLock
public org.apache.hadoop.hbase.client.locking.EntityLock regionLock(List<org.apache.hadoop.hbase.client.RegionInfo> regionInfos, String description, org.apache.hadoop.hbase.Abortable abort) throws IOException - Specified by:
regionLock
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
- Throws:
IOException
-
getSecureBulkLoadManager
- Specified by:
getSecureBulkLoadManager
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
unassign
- Specified by:
unassign
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
- Throws:
IOException
-
getRegionServerSpaceQuotaManager
public org.apache.hadoop.hbase.quotas.RegionServerSpaceQuotaManager getRegionServerSpaceQuotaManager()- Specified by:
getRegionServerSpaceQuotaManager
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
createConnection
public org.apache.hadoop.hbase.client.Connection createConnection(org.apache.hadoop.conf.Configuration conf) throws IOException - Specified by:
createConnection
in interfaceorg.apache.hadoop.hbase.Server
- Throws:
IOException
-
isClusterUp
- Specified by:
isClusterUp
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
getTableDescriptors
- Specified by:
getTableDescriptors
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
getBlockCache
- Specified by:
getBlockCache
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
getMobFileCache
- Specified by:
getMobFileCache
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
getAccessChecker
- Specified by:
getAccessChecker
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
getZKPermissionWatcher
- Specified by:
getZKPermissionWatcher
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
reportRegionSizesForQuotas
- Specified by:
reportRegionSizesForQuotas
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-
reportFileArchivalForQuotas
public boolean reportFileArchivalForQuotas(org.apache.hadoop.hbase.TableName tableName, Collection<Map.Entry<String, Long>> archivedFiles) - Specified by:
reportFileArchivalForQuotas
in interfaceorg.apache.hadoop.hbase.regionserver.RegionServerServices
-