Class HRegionServer
java.lang.Object
java.lang.Thread
org.apache.hadoop.hbase.HBaseServerBase<RSRpcServices>
org.apache.hadoop.hbase.regionserver.HRegionServer
- All Implemented Interfaces:
Runnable,Abortable,ConnectionRegistryEndpoint,ConfigurationObserver,FavoredNodesForRegion,LastSequenceId,MutableOnlineRegions,OnlineRegions,RegionServerServices,Server,Stoppable
- Direct Known Subclasses:
MiniHBaseCluster.MiniHBaseClusterRegionServer
@LimitedPrivate("Tools")
public class HRegionServer
extends HBaseServerBase<RSRpcServices>
implements RegionServerServices, LastSequenceId
HRegionServer makes a set of HRegions available to clients. It checks in with the HMaster. There
are many HRegionServers in a single HBase deployment.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classInner class that runs on a long period checking if regions need compaction.private static classprivate static classprivate static classForce to terminate region server when abort timeout.Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandlerNested classes/interfaces inherited from interface org.apache.hadoop.hbase.regionserver.RegionServerServices
RegionServerServices.PostOpenDeployContext, RegionServerServices.RegionStateTransitionContext -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final String(package private) static final Stringprivate Timerprivate BlockCacheprivate BootstrapNodeManagerprivate BrokenStoreFileCleanerprivate MemStoreFlusherprivate StringUnique identifier for the cluster we are a part of.(package private) CompactedHFilesDischargerprivate ScheduledChoreCheck for compactions requests.private final intprivate CompactSplitprivate booleanprivate static final longUsed to cache the open/close region procedures which already executed.private ExecutorStatusChoreThe Executor status collect chore.private final intprivate ThroughputControllerprivate FileSystemUtilizationChoreprivate HealthCheckChoreThe health check chore.private HeapMemoryManagerprivate booleanprivate LeaseManagerprivate org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockService.BlockingInterfaceprivate static final org.slf4j.Loggerprivate final MasterAddressTrackerprivate final booleanTrue if this RegionServer is coming up in a cluster where there is no Master; means it needs to just come up and make do without a Master to talk to: e.g.private static final Stringprivate MetricsRegionServer(package private) MetricsRegionServerWrapperImplprivate MobFileCacheprivate final org.apache.hbase.thirdparty.com.google.common.cache.Cache<String,HRegionServer.MovedRegionInfo> Used to cache the moved-out regionsprivate NamedQueueServiceChore(package private) final ServerNonceManagerNonce manager.private ScheduledChoreThe nonce manager chore.(package private) final AtomicBooleanMap of regions currently being served by this region server.private final ReentrantReadWriteLockLock for gating access toonlineRegions.private JvmPauseMonitorprivate static final Stringprivate static final Stringprivate ScheduledChoreCheck for flushesprivate PrefetchExecutorNotifierprivate RemoteProcedureResultReporterMap of encoded region names to the DataNode locations they should be hosted on We store the value as Address since InetSocketAddress is required by the HDFS API (create() that takes favored nodes as hints for placing file blocks).private RegionReplicationBufferManagerstatic final Stringregion server process nameprivate static final Stringregionserver codec listprivate final RegionServerAccountingprivate final ConcurrentMap<byte[],Boolean> A map from RegionName to current action in progress.private ReplicationMarkerChoreprivate ReplicationSinkServiceprivate ReplicationSourceServiceprivate final longprivate RpcClient(package private) static final StringDeprecated.since 2.4.0 and will be removed in 4.0.0.private RegionServerCoprocessorHostprivate RSMobFileCleanerChoreprivate RegionServerProcedureManagerHostprivate RegionServerRpcQuotaManagerprivate RSSnapshotVerifierprivate RegionServerSpaceQuotaManagerprivate org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionServerStatusService.BlockingInterfaceprivate booleanprivate SecureBulkLoadManagerprivate final intprivate SplitLogWorkerprivate booleanprivate StorefileRefresherChoreprivate final ConcurrentMap<Long,Long> Used to cache the open/close region procedures which already submitted.static booleanFor testing only! Set to true to skip notifying region assignment to master .private final intprivate static final intWe need a timeout.private Thread.UncaughtExceptionHandler(package private) int(package private) int(package private) static final StringHBASE-18226: This config and hbase.unsafe.regionserver.hostname are mutually exclusive.private WALFactoryprivate LogRollerFields inherited from class org.apache.hadoop.hbase.HBaseServerBase
abortRequested, asyncClusterConnection, choreService, clusterStatusTracker, conf, configurationManager, csm, dataFs, dataRootDir, eventLoopGroupConfig, executorService, infoServer, metaRegionLocationCache, msgInterval, namedQueueRecorder, rpcServices, serverName, sleeper, startcode, stopped, tableDescriptors, userProvider, useThisHostnameInstead, walFs, walRootDir, zooKeeperFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionHRegionServer(org.apache.hadoop.conf.Configuration conf) Starts a HRegionServer at the default location. -
Method Summary
Modifier and TypeMethodDescriptionvoidCause the server to exit without closing the regions it is serving, the log it is using and without notifying the master.private voidvoidAdd to online regions.private voidaddToMovedRegions(String encodedName, ServerName destination, long closeSeqNum, boolean selfMove) private booleanprivate voidblockAndCheckIfStopped(ZKNodeTracker tracker) Utilty method to wait indefinitely on a znode availability while checking if the region server is shut down(package private) org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionSpaceUseReportRequestbuildRegionSpaceUseReportRequest(RegionSizeStore regionSizes) Builds aRegionServerStatusProtos.RegionSpaceUseReportRequestprotobuf message from the region size map.private voidbuildReportAndSend(org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionServerStatusService.BlockingInterface rss, RegionSizeStore regionSizeStore) Builds the region size report and sends it to the master.private org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.ServerLoadbuildServerLoad(long reportStartTime, long reportEndTime) protected booleanprotected booleanprotected booleanprivate static voidcheckCodecs(org.apache.hadoop.conf.Configuration c) Run test on configured codecs to make sure supporting libs are in place.(package private) booleanChecks to see if the file system is still accessible.private ThrowableCleanup after Throwable caught invoking method.(package private) CacheEvictionStatsclearRegionBlockCache(Region region) private voidcloseMetaTableRegions(boolean abort) Close meta region if we carry itprotected booleancloseRegion(String encodedName, boolean abort, ServerName destination) Close asynchronously a region, can be called from the master or internally by the regionserver when stopping.private voidcloseRegionIgnoreErrors(RegionInfo region, boolean abort) Try to close the region, logs a warning on failure but continues.private voidcloseUserRegions(boolean abort) Schedule closes on all user regions.protected booleanprivate voidcomputeIfPersistentBucketCache(Consumer<BucketCache> computation) protected voidconfigureInfoServer(InfoServer infoServer) (package private) static HRegionServerconstructRegionServer(Class<? extends HRegionServer> regionServerClass, org.apache.hadoop.conf.Configuration conf) Utility for constructing an instance of the passed HRegionServer class.private boolean(package private) org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionSpaceUseconvertRegionSize(RegionInfo regionInfo, Long sizeInBytes) Converts a pair ofRegionInfoandlonginto aRegionServerStatusProtos.RegionSpaceUseprotobuf message.private IOExceptionconvertThrowableToIOE(Throwable t, String msg) private voidprotected NamedQueueRecorderprivate static voidcreateNewReplicationInstance(org.apache.hadoop.conf.Configuration conf, HRegionServer server, org.apache.hadoop.fs.FileSystem walFs, org.apache.hadoop.fs.Path walDir, org.apache.hadoop.fs.Path oldWALDir, WALFactory walFactory) Load the replication executorService objects, if anyorg.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.RegionLoadcreateRegionLoad(String encodedRegionName) (package private) org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.RegionLoadcreateRegionLoad(HRegion r, org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.RegionLoad.Builder regionLoadBldr, org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionSpecifier.Builder regionSpecifier) private ServerNameGet the current master from ZooKeeper and open the RPC connection to it.protected ServerNamecreateRegionServerStatusStub(boolean refresh) Get the current master from ZooKeeper and open the RPC connection to it.private org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.ReportRegionStateTransitionRequestprotected RSRpcServicesprivate org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.UserLoadcreateUserLoad(String user, MetricsUserSource userSource) private voidvoiddumpRowLocks(PrintWriter out) Used byRSDumpServletto generate debugging information.(package private) org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceResponseexecRegionServerService(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceRequest serviceRequest) (package private) voidexecuteProcedure(long procId, long initiatingMasterActiveTime, RSProcedureCallable callable) voidfinishRegionProcedure(long procId) Get active master address.Get backup masters address.May be null if this is a master which not carry table.Get a iterator of the available bootstrap nodes.Get cluster id.doubleReturns the underlyingCompactSplitfor the serversprotected RegionServerCoprocessorHost(package private) SortedMap<Long,Collection<HRegion>> (package private) SortedMap<Long,Collection<HRegion>> protected Class<? extends javax.servlet.http.HttpServlet>getFavoredNodesForRegion(String encodedRegionName) Return the favored nodes for a region given its encoded name.doubleReturns reference to FlushRequesterReturns the controller to avoid flush too fastReturns heap memory manager instanceorg.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.RegionStoreSequenceIdsgetLastSequenceId(byte[] encodedRegionName) Returns The RegionServer's "Leases" serviceReturns Master address tracker instance.Get the location of meta regions.Returns the metrics tracker for the region serverMay be null if this is a master which not carry table.getMovedRegion(String encodedRegionName) private StringOnly required for "old" log replay; if it's removed, remove this.intgetOnlineRegion(byte[] regionName) private StringFor tests, web ui and metrics.Gets the online tables in this RS.protected Stringprotected HRegiongetRegion(byte[] regionName) Protected Utility method for safely obtaining an HRegion handle.ReturnRegioninstance.private HRegiongetRegionByEncodedName(byte[] regionName, String encodedRegionName) getRegionByEncodedName(String encodedRegionName) Get all online regions in this RS.getRegions(TableName tableName) Gets the online regions of the specified table.Returns the RegionServerAccounting for this Region ServerString[]Returns RegionServer's instance ofRegionServerRpcQuotaManagerReturns RegionServer's instance ofRegionServerSpaceQuotaManagerConcurrentMap<byte[],Boolean> Get the regions that are currently being opened or closed in the RSReturns Return the object that implements the replication sink executorService.Returns Return the object that implements the replication source executorService.longReturn pause time configured inHConstants.HBASE_RPC_SHORTOPERATION_RETRY_PAUSE_TIME}(package private) RSSnapshotVerifierReturns RegionServer's instance ofSecureBulkLoadManagerprotected StringgetUseThisHostnameInstead(org.apache.hadoop.conf.Configuration conf) getWAL(RegionInfo regionInfo) Returns the WAL for a particular region.private WALActionsListenergetWALEventTrackerListener(org.apache.hadoop.conf.Configuration conf) getWALs()Returns the List of WALs that are used by this server Doesn't include the meta WALprivate longReturns Current write count for all online regions.protected voidhandleReportForDutyResponse(org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionServerStartupResponse c) Run init.private voidprivate voidprivate voidBring up connection to zk ensemble and then wait until a master for this cluster and then after that, wait until cluster 'up' flag has been set.booleanReturns True if the cluster is up.(package private) booleanReturnstruewhen the data file system is available,falseotherwise.private booleanprivate booleanbooleanisOnline()Report the status of the server.booleanReturns True is the server is Stoppingprivate booleanprotected voidkill()protected voidlogin(UserProvider user, String host) static voidintprivate static <T extends ReplicationService>
TnewReplicationInstance(String classname, Class<T> xface, org.apache.hadoop.conf.Configuration conf, HRegionServer server, org.apache.hadoop.fs.FileSystem walFs, org.apache.hadoop.fs.Path logDir, org.apache.hadoop.fs.Path oldLogDir, WALFactory walFactory) voidonConfigurationChange(org.apache.hadoop.conf.Configuration newConf) This method would be called by theConfigurationManagerobject when theConfigurationobject is reloaded from disk.voidTasks to perform after region open to complete deploy of region on regionserverprivate voidAll initialization needed before we go register with Master.
Do bare minimum.regionLock(List<RegionInfo> regionInfo, String description, Abortable abort) Master based locks on namespaces/tables/regions.private voidbooleanregisterService(org.apache.hbase.thirdparty.com.google.protobuf.Service instance) Registers a new protocol bufferServicesubclass as a coprocessor endpoint to be available for handlingvoidremoteProcedureComplete(long procId, long initiatingMasterActiveTime, Throwable error, byte[] procResultData) (package private) voidremoveFromMovedRegions(String encodedName) booleanremoveRegion(HRegion r, ServerName destination) Removes the given Region from the list of onlineRegions.booleanreportFileArchivalForQuotas(TableName tableName, Collection<Map.Entry<String, Long>> archivedFiles) Reports a collection of files, and their sizes, that belonged to the giventablewere just moved to the archive directory.private org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionServerStartupResponse(package private) voidreportProcedureDone(org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.ReportProcedureDoneRequest request) booleanreportRegionSizesForQuotas(RegionSizeStore regionSizeStore) Reports the given map of Regions and their size on the filesystem to the active Master.booleanNotify master that a handler requests to change a region stateprivate static introundSize(long sizeInByte, int sizeUnit) voidrun()The HRegionServer sticks in this loop until closed.private voidprivate voidSetup WAL log and replication if enabled.private voidshutdownWAL(boolean close) private booleanHelper method for use in tests.private static booleansleepInterrupted(long millis) private voidprivate voidStart up replication source and sink handlers.private voidStart maintenance Threads, Server, Worker and lease checker threads.voidStop this service.voidStops the regionserver.protected voidprotected voidWait on all threads to finish.(package private) booleansubmitRegionProcedure(long procId) Will ignore the open/close region procedures which already submitted or executed.private voidtriggerFlushInPrimaryRegion(HRegion region) Trigger a flush in the primary region replica if this region is a secondary replica.protected voidtryRegionServerReport(long reportStartTime, long reportEndTime) voidunassign(byte[] regionName) Unassign the given region from the current regionserver and assign it randomly.voidupdateRegionFavoredNodesMapping(String encodedRegionName, List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ServerName> favoredNodes) Used to update the favored nodes mapping when required.voidprivate voidwaitOnAllRegionsToClose(boolean abort) Wait on regions close.booleanFor testingMethods inherited from class org.apache.hadoop.hbase.HBaseServerBase
closeClusterConnection, closeTableDescriptors, closeZooKeeper, createConnection, getAccessChecker, getAsyncClusterConnection, getChoreService, getConfiguration, getConfigurationManager, getCoordinatedStateManager, getDataRootDir, getEventLoopGroupConfig, getExecutorService, getFileSystem, getInfoServer, getMetaRegionLocationCache, getMsgInterval, getNamedQueueRecorder, getRpcServer, getRpcServices, getServerName, getStartcode, getTableDescriptors, getWALFileSystem, getWALRootDir, getZKPermissionWatcher, getZooKeeper, initializeFileSystem, initializeMemStoreChunkCreator, installShutdownHook, isAborted, isShutdownHookInstalled, isStopped, setAbortRequested, setupClusterConnection, shutdownChore, stopChoreService, stopExecutorService, stopInfoServer, toString, updateConfigurationMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, yieldMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hadoop.hbase.regionserver.RegionServerServices
getAccessChecker, getExecutorService, getRpcServer, getTableDescriptors, getZKPermissionWatcherMethods inherited from interface org.apache.hadoop.hbase.Server
createConnection, getAsyncClusterConnection, getAsyncConnection, getChoreService, getConfiguration, getConnection, getCoordinatedStateManager, getFileSystem, getServerName, getZooKeeper
-
Field Details
-
LOG
-
unitMB
int unitMB -
unitKB
int unitKB -
TEST_SKIP_REPORTING_TRANSITION
For testing only! Set to true to skip notifying region assignment to master . -
regionsInTransitionInRS
A map from RegionName to current action in progress. Boolean value indicates: true - if open region action in progress false - if close region action in progress -
submittedRegionProcedures
Used to cache the open/close region procedures which already submitted. SeesubmitRegionProcedure(long). -
executedRegionProcedures
private final org.apache.hbase.thirdparty.com.google.common.cache.Cache<Long,Long> executedRegionProceduresUsed to cache the open/close region procedures which already executed. SeesubmitRegionProcedure(long). -
movedRegionInfoCache
private final org.apache.hbase.thirdparty.com.google.common.cache.Cache<String,HRegionServer.MovedRegionInfo> movedRegionInfoCacheUsed to cache the moved-out regions -
cacheFlusher
-
hMemManager
-
replicationSourceHandler
-
replicationSinkHandler
-
sameReplicationSourceAndSink
-
compactSplitThread
-
onlineRegions
Map of regions currently being served by this region server. Key is the encoded region name. All access should be synchronized. -
onlineRegionsLock
Lock for gating access toonlineRegions. TODO: If this map is gated by a lock, does it need to be a ConcurrentHashMap? -
regionFavoredNodesMap
Map of encoded region names to the DataNode locations they should be hosted on We store the value as Address since InetSocketAddress is required by the HDFS API (create() that takes favored nodes as hints for placing file blocks). We could have used ServerName here as the value class, but we'd need to convert it to InetSocketAddress at some point before the HDFS API call, and it seems a bit weird to store ServerName since ServerName refers to RegionServers and here we really mean DataNode locations. We don't store it as InetSocketAddress here because the conversion on demand from Address to InetSocketAddress will guarantee the resolution results will be fresh when we need it. -
leaseManager
-
dataFsOk
-
ABORT_TIMEOUT
- See Also:
-
DEFAULT_ABORT_TIMEOUT
- See Also:
-
ABORT_TIMEOUT_TASK
- See Also:
-
stopping
-
killed
-
threadWakeFrequency
-
PERIOD_COMPACTION
- See Also:
-
compactionCheckFrequency
-
PERIOD_FLUSH
- See Also:
-
flushCheckFrequency
-
rssStub
private volatile org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionServerStatusService.BlockingInterface rssStub -
lockStub
private volatile org.apache.hadoop.hbase.shaded.protobuf.generated.LockServiceProtos.LockService.BlockingInterface lockStub -
rpcClient
-
uncaughtExceptionHandler
-
pauseMonitor
-
rsSnapshotVerifier
-
REGIONSERVER
region server process name- See Also:
-
metricsRegionServer
-
metricsRegionServerImpl
-
compactionChecker
Check for compactions requests. -
periodicFlusher
Check for flushes -
walFactory
-
walRoller
-
procedureResultReporter
-
online
-
masterAddressTracker
-
splitLogWorker
-
shortOperationTimeout
-
retryPauseTime
-
regionServerAccounting
-
namedQueueServiceChore
-
blockCache
-
mobFileCache
-
healthCheckChore
The health check chore. -
executorStatusChore
The Executor status collect chore. -
nonceManagerChore
The nonce manager chore. -
coprocessorServiceHandlers
private Map<String,org.apache.hbase.thirdparty.com.google.protobuf.Service> coprocessorServiceHandlers -
RS_HOSTNAME_DISABLE_MASTER_REVERSEDNS_KEY
@Deprecated @LimitedPrivate("Configuration") static final String RS_HOSTNAME_DISABLE_MASTER_REVERSEDNS_KEYDeprecated.since 2.4.0 and will be removed in 4.0.0. UseUNSAFE_RS_HOSTNAME_DISABLE_MASTER_REVERSEDNS_KEYinstead.- See Also:
-
UNSAFE_RS_HOSTNAME_DISABLE_MASTER_REVERSEDNS_KEY
@LimitedPrivate("Configuration") static final String UNSAFE_RS_HOSTNAME_DISABLE_MASTER_REVERSEDNS_KEYHBASE-18226: This config and hbase.unsafe.regionserver.hostname are mutually exclusive. Exception will be thrown if both are used.- See Also:
-
clusterId
Unique identifier for the cluster we are a part of. -
storefileRefresher
-
rsHost
-
rspmHost
-
rsQuotaManager
-
rsSpaceQuotaManager
-
nonceManager
Nonce manager. Nonces are used to make operations like increment and append idempotent in the case where client doesn't receive the response from a successful operation and retries. We track the successful ops for some time via a nonce sent by client and handle duplicate operations (currently, by failing them; in future we might use MVCC to return result). Nonces are also recovered from WAL during, recovery; however, the caveats (from HBASE-3787) are: - WAL recovery is optimized, and under high load we won't read nearly nonce-timeout worth of past records. If we don't read the records, we don't read and recover the nonces. Some WALs within nonce-timeout at recovery may not even be present due to rolling/cleanup. - There's no WAL recovery during normal region move, so nonces will not be transfered. We can have separate additional "Nonce WAL". It will just contain bunch of numbers and won't be flushed on main path - because WAL itself also contains nonces, if we only flush it before memstore flush, for a given nonce we will either see it in the WAL (if it was never flushed to disk, it will be part of recovery), or we'll see it as part of the nonce log (or both occasionally, which doesn't matter). Nonce log file can be deleted after the latest nonce in it expired. It can also be recovered during move. -
brokenStoreFileCleaner
-
rsMobFileCleanerChore
-
compactedFileDischarger
-
flushThroughputController
-
secureBulkLoadManager
-
fsUtilizationChore
-
bootstrapNodeManager
-
masterless
True if this RegionServer is coming up in a cluster where there is no Master; means it needs to just come up and make do without a Master to talk to: e.g. in test or HRegionServer is doing other than its usual duties: e.g. as an hollowed-out host whose only purpose is as a Replication-stream sink; see HBASE-18846 for more. TODO: can this replaceTEST_SKIP_REPORTING_TRANSITION? -
MASTERLESS_CONFIG_NAME
- See Also:
-
REGIONSERVER_CODEC
regionserver codec list- See Also:
-
abortMonitor
-
regionReplicationBufferManager
-
replicationMarkerChore
-
prefetchExecutorNotifier
-
TIMEOUT_REGION_MOVED
We need a timeout. If not there is a risk of giving a wrong information: this would double the number of network calls instead of reducing them.- See Also:
-
-
Constructor Details
-
HRegionServer
Starts a HRegionServer at the default location. Don't start any services or managers in here in the Constructor. Defer till after we register with the Master as much as possible. SeestartServices().- Throws:
IOException
-
-
Method Details
-
getUseThisHostnameInstead
protected String getUseThisHostnameInstead(org.apache.hadoop.conf.Configuration conf) throws IOException - Specified by:
getUseThisHostnameInsteadin classHBaseServerBase<RSRpcServices>- Throws:
IOException
-
login
- Specified by:
loginin classHBaseServerBase<RSRpcServices>- Throws:
IOException
-
getProcessName
- Specified by:
getProcessNamein classHBaseServerBase<RSRpcServices>
-
getCoprocessorHost
- Specified by:
getCoprocessorHostin classHBaseServerBase<RSRpcServices>
-
canCreateBaseZNode
- Specified by:
canCreateBaseZNodein classHBaseServerBase<RSRpcServices>
-
canUpdateTableDescriptor
- Specified by:
canUpdateTableDescriptorin classHBaseServerBase<RSRpcServices>
-
cacheTableDescriptor
- Specified by:
cacheTableDescriptorin classHBaseServerBase<RSRpcServices>
-
createRpcServices
- Specified by:
createRpcServicesin classHBaseServerBase<RSRpcServices>- Throws:
IOException
-
configureInfoServer
- Specified by:
configureInfoServerin classHBaseServerBase<RSRpcServices>
-
getDumpServlet
- Specified by:
getDumpServletin classHBaseServerBase<RSRpcServices>
-
dumpRowLocks
Used byRSDumpServletto generate debugging information. -
registerService
Description copied from interface:RegionServerServicesRegisters a new protocol bufferServicesubclass as a coprocessor endpoint to be available for handling- Specified by:
registerServicein interfaceRegionServerServices- Parameters:
instance- theServicesubclass instance to expose as a coprocessor endpoint- Returns:
trueif the registration was successful,false
-
checkCodecs
Run test on configured codecs to make sure supporting libs are in place.- Throws:
IOException
-
getClusterId
Description copied from interface:ConnectionRegistryEndpointGet cluster id.- Specified by:
getClusterIdin interfaceConnectionRegistryEndpoint
-
preRegistrationInitialization
All initialization needed before we go register with Master.
Do bare minimum. Do bulk of initializations AFTER we've connected to the Master.
In here we just put up the RpcServer, setup Connection, and ZooKeeper. -
initializeZooKeeper
Bring up connection to zk ensemble and then wait until a master for this cluster and then after that, wait until cluster 'up' flag has been set. This is the order in which master does things.Finally open long-living server short-circuit connection.
- Throws:
IOExceptionInterruptedException
-
blockAndCheckIfStopped
Utilty method to wait indefinitely on a znode availability while checking if the region server is shut down- Parameters:
tracker- znode tracker to use- Throws:
IOException- any IO exception, plus if the RS is stoppedInterruptedException- if the waiting thread is interrupted
-
isClusterUp
Returns True if the cluster is up.- Specified by:
isClusterUpin interfaceRegionServerServices- Overrides:
isClusterUpin classHBaseServerBase<RSRpcServices>
-
initializeReplicationMarkerChore
-
isStopping
Description copied from interface:ServerReturns True is the server is Stopping- Specified by:
isStoppingin interfaceServer
-
run
The HRegionServer sticks in this loop until closed. -
containsMetaTableRegions
-
areAllUserRegionsOffline
-
getWriteRequestCount
Returns Current write count for all online regions. -
tryRegionServerReport
@Private protected void tryRegionServerReport(long reportStartTime, long reportEndTime) throws IOException - Throws:
IOException
-
reportRegionSizesForQuotas
Reports the given map of Regions and their size on the filesystem to the active Master.- Specified by:
reportRegionSizesForQuotasin interfaceRegionServerServices- Parameters:
regionSizeStore- The store containing region sizes- Returns:
- false if FileSystemUtilizationChore should pause reporting to master. true otherwise
-
buildReportAndSend
private void buildReportAndSend(org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionServerStatusService.BlockingInterface rss, RegionSizeStore regionSizeStore) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException Builds the region size report and sends it to the master. Upon successful sending of the report, the region sizes that were sent are marked as sent.- Parameters:
rss- The stub to send to the MasterregionSizeStore- The store containing region sizes- Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
buildRegionSpaceUseReportRequest
org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionSpaceUseReportRequest buildRegionSpaceUseReportRequest(RegionSizeStore regionSizes) Builds aRegionServerStatusProtos.RegionSpaceUseReportRequestprotobuf message from the region size map.- Parameters:
regionSizes- The size in bytes of regions- Returns:
- The corresponding protocol buffer message.
-
convertRegionSize
org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionSpaceUse convertRegionSize(RegionInfo regionInfo, Long sizeInBytes) Converts a pair ofRegionInfoandlonginto aRegionServerStatusProtos.RegionSpaceUseprotobuf message.- Parameters:
regionInfo- The RegionInfosizeInBytes- The size in bytes of the Region- Returns:
- The protocol buffer
-
buildServerLoad
private org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.ServerLoad buildServerLoad(long reportStartTime, long reportEndTime) throws IOException - Throws:
IOException
-
getOnlineRegionsAsPrintableString
-
waitOnAllRegionsToClose
Wait on regions close. -
sleepInterrupted
-
shutdownWAL
-
handleReportForDutyResponse
protected void handleReportForDutyResponse(org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionServerStartupResponse c) throws IOException Run init. Sets up wal and starts up all server threads.- Parameters:
c- Extra configuration.- Throws:
IOException
-
startHeapMemoryManager
-
createMyEphemeralNode
- Throws:
org.apache.zookeeper.KeeperException
-
deleteMyEphemeralNode
- Throws:
org.apache.zookeeper.KeeperException
-
getRegionServerAccounting
Description copied from interface:RegionServerServicesReturns the RegionServerAccounting for this Region Server- Specified by:
getRegionServerAccountingin interfaceRegionServerServices
-
roundSize
-
computeIfPersistentBucketCache
-
createRegionLoad
org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.RegionLoad createRegionLoad(HRegion r, org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.RegionLoad.Builder regionLoadBldr, org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.RegionSpecifier.Builder regionSpecifier) throws IOException - Parameters:
r- Region to get RegionLoad for.regionLoadBldr- the RegionLoad.Builder, can be nullregionSpecifier- the RegionSpecifier.Builder, can be null- Returns:
- RegionLoad instance.
- Throws:
IOException
-
createUserLoad
private org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.UserLoad createUserLoad(String user, MetricsUserSource userSource) -
createRegionLoad
public org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.RegionLoad createRegionLoad(String encodedRegionName) throws IOException - Throws:
IOException
-
isOnline
Report the status of the server. A server is online once all the startup is completed (setting up filesystem, starting executorService threads, etc.). This method is designed mostly to be useful in tests.- Returns:
- true if online, false if not.
-
setupWALAndReplication
Setup WAL log and replication if enabled. Replication setup is done in here because it wants to be hooked up to WAL.- Throws:
IOException
-
getWALEventTrackerListener
-
startReplicationService
Start up replication source and sink handlers.- Throws:
IOException
-
getMasterAddressTracker
Returns Master address tracker instance. -
startServices
Start maintenance Threads, Server, Worker and lease checker threads. Start all threads we need to run. This is called after we've successfully registered with the Master. Install an UncaughtExceptionHandler that calls abort of RegionServer if we get an unhandled exception. We cannot set the handler on all threads. Server's internal Listener thread is off limits. For Server, if an OOME, it waits a while then retries. Meantime, a flush or a compaction that tries to run should trigger same critical condition and the shutdown will run. On its way out, this server will shut down Server. Leases are sort of inbetween. It has an internal thread that while it inherits from Chore, it keeps its own internal stop mechanism so needs to be stopped by this hosting server. Worker logs the exception and exits.- Throws:
IOException
-
initializeThreads
-
registerConfigurationObservers
-
isHealthy
-
getWALs
Description copied from interface:RegionServerServicesReturns the List of WALs that are used by this server Doesn't include the meta WAL- Specified by:
getWALsin interfaceRegionServerServices
-
getWAL
Description copied from interface:RegionServerServicesReturns the WAL for a particular region. Pass null for getting the default (common) WAL- Specified by:
getWALin interfaceRegionServerServices- Throws:
IOException
-
getWalRoller
-
getWalFactory
-
stop
Description copied from interface:StoppableStop this service. Implementers should favor logging errors over throwing RuntimeExceptions. -
stop
Stops the regionserver.- Parameters:
msg- Status messageforce- True if this is a regionserver abortuser- The user executing the stop request, or null if no user is associated
-
waitForServerOnline
-
postOpenDeployTasks
public void postOpenDeployTasks(RegionServerServices.PostOpenDeployContext context) throws IOException Description copied from interface:RegionServerServicesTasks to perform after region open to complete deploy of region on regionserver- Specified by:
postOpenDeployTasksin interfaceRegionServerServices- Parameters:
context- the context- Throws:
IOException
-
skipReportingTransition
Helper method for use in tests. Skip the region transition report when there's no master around to receive it. -
createReportRegionStateTransitionRequest
private org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.ReportRegionStateTransitionRequest createReportRegionStateTransitionRequest(RegionServerServices.RegionStateTransitionContext context) -
reportRegionStateTransition
public boolean reportRegionStateTransition(RegionServerServices.RegionStateTransitionContext context) Description copied from interface:RegionServerServicesNotify master that a handler requests to change a region state- Specified by:
reportRegionStateTransitionin interfaceRegionServerServices
-
triggerFlushInPrimaryRegion
Trigger a flush in the primary region replica if this region is a secondary replica. Does not block this thread. See RegionReplicaFlushHandler for details. -
getRSRpcServices
-
abort
Cause the server to exit without closing the regions it is serving, the log it is using and without notifying the master. Used unit testing and on catastrophic events such as HDFS is yanked out from under hbase or we OOME. the reason we are aborting the exception that caused the abort, or null -
kill
-
scheduleAbortTimer
-
stopServiceThreads
Wait on all threads to finish. Presumption is that all closes and stops have already been called. -
getReplicationSourceService
Returns Return the object that implements the replication source executorService.- Specified by:
getReplicationSourceServicein interfaceRegionServerServices
-
getReplicationSinkService
Returns Return the object that implements the replication sink executorService. -
createRegionServerStatusStub
Get the current master from ZooKeeper and open the RPC connection to it. To get a fresh connection, the current rssStub must be null. Method will block until a master is available. You can break from this block by requesting the server stop.- Returns:
- master + port, or null if server has been stopped
-
createRegionServerStatusStub
Get the current master from ZooKeeper and open the RPC connection to it. To get a fresh connection, the current rssStub must be null. Method will block until a master is available. You can break from this block by requesting the server stop.- Parameters:
refresh- If true then master address will be read from ZK, otherwise use cached data- Returns:
- master + port, or null if server has been stopped
-
keepLooping
- Returns:
- True if we should break loop because cluster is going down or this server has been stopped or hdfs has gone bad.
-
reportForDuty
private org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionServerStartupResponse reportForDuty() throws IOException- Throws:
IOException
-
getLastSequenceId
public org.apache.hadoop.hbase.shaded.protobuf.generated.ClusterStatusProtos.RegionStoreSequenceIds getLastSequenceId(byte[] encodedRegionName) - Specified by:
getLastSequenceIdin interfaceLastSequenceId- Parameters:
encodedRegionName- Encoded region name- Returns:
- Last flushed sequence Id for region and its stores. Id will be -1 if it can't be determined
-
closeMetaTableRegions
Close meta region if we carry it- Parameters:
abort- Whether we're running an abort.
-
closeUserRegions
Schedule closes on all user regions. Should be safe calling multiple times because it wont' close regions that are already closed or that are closing.- Parameters:
abort- Whether we're running an abort.
-
getOnlineRegions
-
getNumberOfOnlineRegions
-
getOnlineRegionsLocalContext
For tests, web ui and metrics. This method will only work if HRegionServer is in the same JVM as client; HRegion cannot be serialized to cross an rpc. -
addRegion
Description copied from interface:MutableOnlineRegionsAdd to online regions.- Specified by:
addRegionin interfaceMutableOnlineRegions
-
addRegion
-
getCopyOfOnlineRegionsSortedByOffHeapSize
- Returns:
- A new Map of online regions sorted by region off-heap size with the first entry being the biggest.
-
getCopyOfOnlineRegionsSortedByOnHeapSize
- Returns:
- A new Map of online regions sorted by region heap size with the first entry being the biggest.
-
getFlushRequester
Returns reference to FlushRequester- Specified by:
getFlushRequesterin interfaceRegionServerServices- Returns:
- Implementation of
FlushRequesteror null. Usually it will not be null unless during intialization.
-
getCompactionRequestor
- Specified by:
getCompactionRequestorin interfaceRegionServerServices- Returns:
- Implementation of
CompactionRequesteror null. Usually it will not be null unless during intialization.
-
getLeaseManager
Description copied from interface:RegionServerServicesReturns The RegionServer's "Leases" service- Specified by:
getLeaseManagerin interfaceRegionServerServices
-
isDataFileSystemOk
boolean isDataFileSystemOk()Returnstruewhen the data file system is available,falseotherwise. -
getRegionServerCoprocessorHost
-
getRegionsInTransitionInRS
Description copied from interface:RegionServerServicesGet the regions that are currently being opened or closed in the RS- Specified by:
getRegionsInTransitionInRSin interfaceRegionServerServices- Returns:
- map of regions in transition in this RS
-
getRegionServerRpcQuotaManager
Description copied from interface:RegionServerServicesReturns RegionServer's instance ofRegionServerRpcQuotaManager- Specified by:
getRegionServerRpcQuotaManagerin interfaceRegionServerServices
-
createNewReplicationInstance
private static void createNewReplicationInstance(org.apache.hadoop.conf.Configuration conf, HRegionServer server, org.apache.hadoop.fs.FileSystem walFs, org.apache.hadoop.fs.Path walDir, org.apache.hadoop.fs.Path oldWALDir, WALFactory walFactory) throws IOException Load the replication executorService objects, if any- Throws:
IOException
-
newReplicationInstance
private static <T extends ReplicationService> T newReplicationInstance(String classname, Class<T> xface, org.apache.hadoop.conf.Configuration conf, HRegionServer server, org.apache.hadoop.fs.FileSystem walFs, org.apache.hadoop.fs.Path logDir, org.apache.hadoop.fs.Path oldLogDir, WALFactory walFactory) throws IOException - Throws:
IOException
-
getWalGroupsReplicationStatus
-
constructRegionServer
static HRegionServer constructRegionServer(Class<? extends HRegionServer> regionServerClass, org.apache.hadoop.conf.Configuration conf) Utility for constructing an instance of the passed HRegionServer class. -
main
- See Also:
-
getRegions
Gets the online regions of the specified table. This method looks at the in-memory onlineRegions. It does not go tohbase:meta. Only returns online regions. If a region on this table has been closed during a disable, etc., it will not be included in the returned list. So, the returned list may not necessarily be ALL regions in this table, its all the ONLINE regions in the table.- Specified by:
getRegionsin interfaceOnlineRegions- Specified by:
getRegionsin interfaceRegionServerServices- Parameters:
tableName- table to limit the scope of the query- Returns:
- Online regions from
tableName
-
getRegions
Description copied from interface:OnlineRegionsGet all online regions in this RS.- Specified by:
getRegionsin interfaceOnlineRegions- Specified by:
getRegionsin interfaceRegionServerServices- Returns:
- List of online Region
-
getOnlineTables
Gets the online tables in this RS. This method looks at the in-memory onlineRegions.- Returns:
- all the online tables in this RS
-
getRegionServerCoprocessors
-
closeRegionIgnoreErrors
Try to close the region, logs a warning on failure but continues.- Parameters:
region- Region to close
-
closeRegion
protected boolean closeRegion(String encodedName, boolean abort, ServerName destination) throws NotServingRegionException Close asynchronously a region, can be called from the master or internally by the regionserver when stopping. If called from the master, the region will update the status.If an opening was in progress, this method will cancel it, but will not start a new close. The coprocessors are not called in this case. A NotServingRegionException exception is thrown.
If a close was in progress, this new request will be ignored, and an exception thrown.
Provides additional flag to indicate if this region blocks should be evicted from the cache.
- Parameters:
encodedName- Region to closeabort- True if we are abortingdestination- Where the Region is being moved too... maybe null if unknown.- Returns:
- True if closed a region.
- Throws:
NotServingRegionException- if the region is not online
-
getOnlineRegion
- Returns:
- HRegion for the passed binary
regionNameor null if named region is not member of the online regions.
-
getRegion
Description copied from interface:OnlineRegionsReturnRegioninstance. Only works if caller is in same context, in same JVM. Region is not serializable.- Specified by:
getRegionin interfaceOnlineRegions- Specified by:
getRegionin interfaceRegionServerServices- Returns:
- Region for the passed encoded
encodedRegionNameor null if named region is not member of the online regions.
-
removeRegion
Description copied from interface:MutableOnlineRegionsRemoves the given Region from the list of onlineRegions.- Specified by:
removeRegionin interfaceMutableOnlineRegions- Parameters:
r- Region to remove.destination- Destination, if any, null otherwise.- Returns:
- True if we removed a region from online list.
-
getRegion
Protected Utility method for safely obtaining an HRegion handle.- Parameters:
regionName- Name of onlineHRegionto return- Returns:
HRegionforregionName- Throws:
NotServingRegionException
-
getRegionByEncodedName
- Throws:
NotServingRegionException
-
getRegionByEncodedName
private HRegion getRegionByEncodedName(byte[] regionName, String encodedRegionName) throws NotServingRegionException - Throws:
NotServingRegionException
-
cleanup
Cleanup after Throwable caught invoking method. Convertstto IOE if it isn't already.- Parameters:
t- Throwablemsg- Message to log in error. Can be null.- Returns:
- Throwable converted to an IOE; methods can only let out IOEs.
-
convertThrowableToIOE
- Parameters:
msg- Message to put in new IOE if passedtis not an IOE- Returns:
- Make
tan IOE if it isn't already.
-
checkFileSystem
boolean checkFileSystem()Checks to see if the file system is still accessible. If not, sets abortRequested and stopRequested- Returns:
- false if file system is not available
-
updateRegionFavoredNodesMapping
public void updateRegionFavoredNodesMapping(String encodedRegionName, List<org.apache.hadoop.hbase.shaded.protobuf.generated.HBaseProtos.ServerName> favoredNodes) Description copied from interface:FavoredNodesForRegionUsed to update the favored nodes mapping when required.- Specified by:
updateRegionFavoredNodesMappingin interfaceFavoredNodesForRegion
-
getFavoredNodesForRegion
Return the favored nodes for a region given its encoded name. Look at the comment aroundregionFavoredNodesMapon why we convert to InetSocketAddress[] here.- Specified by:
getFavoredNodesForRegionin interfaceFavoredNodesForRegion- Parameters:
encodedRegionName- the encoded region name.- Returns:
- array of favored locations
-
getNonceManager
Description copied from interface:RegionServerServicesOnly required for "old" log replay; if it's removed, remove this.- Specified by:
getNonceManagerin interfaceRegionServerServices- Returns:
- The RegionServer's NonceManager
-
addToMovedRegions
private void addToMovedRegions(String encodedName, ServerName destination, long closeSeqNum, boolean selfMove) -
removeFromMovedRegions
-
getMovedRegion
-
movedRegionCacheExpiredTime
-
getMyEphemeralNodePath
-
isHealthCheckerConfigured
-
getCompactSplitThread
Returns the underlyingCompactSplitfor the servers -
execRegionServerService
org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceResponse execRegionServerService(org.apache.hbase.thirdparty.com.google.protobuf.RpcController controller, org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos.CoprocessorServiceRequest serviceRequest) throws org.apache.hbase.thirdparty.com.google.protobuf.ServiceException - Throws:
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
-
getBlockCache
May be null if this is a master which not carry table.- Specified by:
getBlockCachein interfaceRegionServerServices- Returns:
- The block cache instance used by the regionserver.
-
getMobFileCache
May be null if this is a master which not carry table.- Specified by:
getMobFileCachein interfaceRegionServerServices- Returns:
- The cache for mob files used by the regionserver.
-
clearRegionBlockCache
-
getCompactionPressure
- Specified by:
getCompactionPressurein interfaceRegionServerServices- Returns:
- the max compaction pressure of all stores on this regionserver. The value should be greater than or equal to 0.0, and any value greater than 1.0 means we enter the emergency state that some stores have too many store files.
- See Also:
-
getHeapMemoryManager
Description copied from interface:RegionServerServicesReturns heap memory manager instance- Specified by:
getHeapMemoryManagerin interfaceRegionServerServices
-
getMemStoreFlusher
-
walRollRequestFinished
For testing- Returns:
- whether all wal roll request finished for this regionserver
-
getFlushThroughputController
Description copied from interface:RegionServerServicesReturns the controller to avoid flush too fast- Specified by:
getFlushThroughputControllerin interfaceRegionServerServices
-
getFlushPressure
- Specified by:
getFlushPressurein interfaceRegionServerServices- Returns:
- the flush pressure of all stores on this regionserver. The value should be greater than or equal to 0.0, and any value greater than 1.0 means we enter the emergency state that global memstore size already exceeds lower limit.
-
onConfigurationChange
Description copied from interface:ConfigurationObserverThis method would be called by theConfigurationManagerobject when theConfigurationobject is reloaded from disk.- Specified by:
onConfigurationChangein interfaceConfigurationObserver
-
getMetrics
Description copied from interface:RegionServerServicesReturns the metrics tracker for the region server- Specified by:
getMetricsin interfaceRegionServerServices
-
getSecureBulkLoadManager
Description copied from interface:RegionServerServicesReturns RegionServer's instance ofSecureBulkLoadManager- Specified by:
getSecureBulkLoadManagerin interfaceRegionServerServices
-
regionLock
Description copied from interface:RegionServerServicesMaster based locks on namespaces/tables/regions.- Specified by:
regionLockin interfaceRegionServerServices
-
unassign
Description copied from interface:RegionServerServicesUnassign the given region from the current regionserver and assign it randomly. Could still be assigned to us. This is used to solve some tough problems for which you need to reset the state of a region. For example, if you hit FileNotFound exception and want to refresh the store file list.See HBASE-17712 for more details.
- Specified by:
unassignin interfaceRegionServerServices- Throws:
IOException
-
getRegionServerSpaceQuotaManager
Description copied from interface:RegionServerServicesReturns RegionServer's instance ofRegionServerSpaceQuotaManager- Specified by:
getRegionServerSpaceQuotaManagerin interfaceRegionServerServices
-
reportFileArchivalForQuotas
public boolean reportFileArchivalForQuotas(TableName tableName, Collection<Map.Entry<String, Long>> archivedFiles) Description copied from interface:RegionServerServicesReports a collection of files, and their sizes, that belonged to the giventablewere just moved to the archive directory.- Specified by:
reportFileArchivalForQuotasin interfaceRegionServerServices- Parameters:
tableName- The name of the table that files previously belonged toarchivedFiles- Files and their sizes that were moved to archive- Returns:
trueif the files were successfully reported,falseotherwise.
-
executeProcedure
-
remoteProcedureComplete
public void remoteProcedureComplete(long procId, long initiatingMasterActiveTime, Throwable error, byte[] procResultData) -
reportProcedureDone
void reportProcedureDone(org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.ReportProcedureDoneRequest request) throws IOException - Throws:
IOException
-
submitRegionProcedure
Will ignore the open/close region procedures which already submitted or executed. When master had unfinished open/close region procedure and restarted, new active master may send duplicate open/close region request to regionserver. The open/close request is submitted to a thread pool and execute. So first need a cache for submitted open/close region procedures. After the open/close region request executed and report region transition succeed, cache it in executed region procedures cache. SeefinishRegionProcedure(long). After report region transition succeed, master will not send the open/close region request to regionserver again. And we thought that the ongoing duplicate open/close region request should not be delayed more than 600 seconds. So the executed region procedures cache will expire after 600 seconds. See HBASE-22404 for more details.- Parameters:
procId- the id of the open/close region procedure- Returns:
- true if the procedure can be submitted.
-
finishRegionProcedure
- Parameters:
procId- the id of the open/close region procedure
-
getCompactedHFilesDischarger
-
getRetryPauseTime
Return pause time configured inHConstants.HBASE_RPC_SHORTOPERATION_RETRY_PAUSE_TIME}- Returns:
- pause time
-
getActiveMaster
Description copied from interface:ConnectionRegistryEndpointGet active master address.- Specified by:
getActiveMasterin interfaceConnectionRegistryEndpoint
-
getBackupMasters
Description copied from interface:ConnectionRegistryEndpointGet backup masters address.- Specified by:
getBackupMastersin interfaceConnectionRegistryEndpoint
-
getBootstrapNodes
Description copied from interface:ConnectionRegistryEndpointGet a iterator of the available bootstrap nodes.- Specified by:
getBootstrapNodesin interfaceConnectionRegistryEndpoint
-
getMetaLocations
Description copied from interface:ConnectionRegistryEndpointGet the location of meta regions.- Specified by:
getMetaLocationsin interfaceConnectionRegistryEndpoint
-
createNamedQueueRecord
- Specified by:
createNamedQueueRecordin classHBaseServerBase<RSRpcServices>
-
clusterMode
- Specified by:
clusterModein classHBaseServerBase<RSRpcServices>
-
getBrokenStoreFileCleaner
-
getRSMobFileCleanerChore
-
getRsSnapshotVerifier
-
stopChores
- Specified by:
stopChoresin classHBaseServerBase<RSRpcServices>
-
getRegionReplicationBufferManager
- Specified by:
getRegionReplicationBufferManagerin interfaceRegionServerServices
-