Package org.apache.hadoop.hbase
Class MiniHBaseCluster.MiniHBaseClusterRegionServer
java.lang.Object
java.lang.Thread
org.apache.hadoop.hbase.HBaseServerBase<RSRpcServices>
org.apache.hadoop.hbase.regionserver.HRegionServer
org.apache.hadoop.hbase.MiniHBaseCluster.MiniHBaseClusterRegionServer
- All Implemented Interfaces:
Runnable,Abortable,ConnectionRegistryEndpoint,ConfigurationObserver,FavoredNodesForRegion,LastSequenceId,MutableOnlineRegions,OnlineRegions,RegionServerServices,Server,Stoppable
- Enclosing class:
- MiniHBaseCluster
Subclass so can get at protected methods (none at moment). Also, creates a FileSystem instance
per instantiation. Adds a shutdown own FileSystem on the way out. Shuts down own Filesystem
only, not All filesystems as the FileSystem system exit hook does.
-
Nested Class Summary
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 Set<ServerName>List of RegionServers killed so far.private Threadprivate UserFields inherited from class org.apache.hadoop.hbase.regionserver.HRegionServer
REGIONSERVER, TEST_SKIP_REPORTING_TRANSITIONFields 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
Constructors -
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 voidabortRegionServer(String reason, Throwable cause) protected voidhandleReportForDutyResponse(org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionServerStartupResponse c) Run init.protected voidkill()voidrun()The HRegionServer sticks in this loop until closed.private voidMethods inherited from class org.apache.hadoop.hbase.regionserver.HRegionServer
addRegion, cacheTableDescriptor, canCreateBaseZNode, canUpdateTableDescriptor, closeRegion, clusterMode, configureInfoServer, createNamedQueueRecord, createRegionLoad, createRegionServerStatusStub, createRpcServices, dumpRowLocks, finishRegionProcedure, getActiveMaster, getBackupMasters, getBlockCache, getBootstrapNodes, getBrokenStoreFileCleaner, getClusterId, getCompactedHFilesDischarger, getCompactionPressure, getCompactionRequestor, getCompactSplitThread, getCoprocessorHost, getDumpServlet, getFavoredNodesForRegion, getFlushPressure, getFlushRequester, getFlushThroughputController, getHeapMemoryManager, getLastSequenceId, getLeaseManager, getMasterAddressTracker, getMemStoreFlusher, getMetaLocations, getMetrics, getMobFileCache, getMovedRegion, getNonceManager, getNumberOfOnlineRegions, getOnlineRegion, getOnlineRegions, getOnlineRegionsLocalContext, getOnlineTables, getProcessName, getRegion, getRegion, getRegionByEncodedName, getRegionReplicationBufferManager, getRegions, getRegions, getRegionServerAccounting, getRegionServerCoprocessorHost, getRegionServerCoprocessors, getRegionServerRpcQuotaManager, getRegionServerSpaceQuotaManager, getRegionsInTransitionInRS, getReplicationSinkService, getReplicationSourceService, getRetryPauseTime, getRSMobFileCleanerChore, getRSRpcServices, getSecureBulkLoadManager, getUseThisHostnameInstead, getWAL, getWalFactory, getWalGroupsReplicationStatus, getWalRoller, getWALs, isClusterUp, isOnline, isStopping, login, main, movedRegionCacheExpiredTime, onConfigurationChange, postOpenDeployTasks, regionLock, registerService, remoteProcedureComplete, removeRegion, reportFileArchivalForQuotas, reportRegionSizesForQuotas, reportRegionStateTransition, stop, stop, stopChores, stopServiceThreads, tryRegionServerReport, unassign, updateRegionFavoredNodesMapping, waitForServerOnline, walRollRequestFinishedMethods 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
-
shutdownThread
-
user
-
killedServers
List of RegionServers killed so far. ServerName also comprises startCode of a server, so any restarted instances of the same server will have different ServerName and will not coincide with past dead ones. So there's no need to cleanup this list.
-
-
Constructor Details
-
MiniHBaseClusterRegionServer
public MiniHBaseClusterRegionServer(org.apache.hadoop.conf.Configuration conf) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
-
Method Details
-
handleReportForDutyResponse
protected void handleReportForDutyResponse(org.apache.hadoop.hbase.shaded.protobuf.generated.RegionServerStatusProtos.RegionServerStartupResponse c) throws IOException Description copied from class:HRegionServerRun init. Sets up wal and starts up all server threads.- Overrides:
handleReportForDutyResponsein classHRegionServer- Parameters:
c- Extra configuration.- Throws:
IOException
-
run
Description copied from class:HRegionServerThe HRegionServer sticks in this loop until closed.- Specified by:
runin interfaceRunnable- Overrides:
runin classHRegionServer
-
runRegionServer
-
kill
- Overrides:
killin classHRegionServer
-
abort
Description copied from class:HRegionServerCause 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- Specified by:
abortin interfaceAbortable- Overrides:
abortin classHRegionServer- Parameters:
reason- Why we're aborting.cause- Throwable that caused abort. Can be null.
-
abortRegionServer
-