@InterfaceAudience.Private public abstract class HBaseServerBase<R extends HBaseRpcServicesBase<?>> extends Thread implements Server, ConfigurationObserver, ConnectionRegistryEndpoint
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected AtomicBoolean |
abortRequested |
protected AsyncClusterConnection |
asyncClusterConnection
The asynchronous cluster connection to be shared by services.
|
protected ChoreService |
choreService
ChoreService used to schedule tasks that we want to run periodically
|
protected ClusterStatusTracker |
clusterStatusTracker |
protected org.apache.hadoop.conf.Configuration |
conf |
protected ConfigurationManager |
configurationManager
Configuration manager is used to register/deregister and notify the configuration observers
when the regionserver is notified that there was a change in the on disk configs.
|
protected CoordinatedStateManager |
csm |
protected HFileSystem |
dataFs |
protected org.apache.hadoop.fs.Path |
dataRootDir |
protected NettyEventLoopGroupConfig |
eventLoopGroupConfig |
protected ExecutorService |
executorService |
protected InfoServer |
infoServer |
private boolean |
isShutdownHookInstalled |
private static org.slf4j.Logger |
LOG |
protected MetaRegionLocationCache |
metaRegionLocationCache
Cache for the meta region replica's locations.
|
protected int |
msgInterval |
protected NamedQueueRecorder |
namedQueueRecorder
Provide online slow log responses from ringbuffer
|
protected R |
rpcServices |
protected ServerName |
serverName
The server name the Master sees us as.
|
protected Sleeper |
sleeper |
protected long |
startcode
This servers startcode.
|
protected boolean |
stopped |
protected TableDescriptors |
tableDescriptors
Go here to get table descriptors.
|
protected UserProvider |
userProvider |
protected String |
useThisHostnameInstead
hostname specified by hostname config
|
protected HFileSystem |
walFs |
protected org.apache.hadoop.fs.Path |
walRootDir |
protected ZKWatcher |
zooKeeper |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
HBaseServerBase(org.apache.hadoop.conf.Configuration conf,
String name) |
Modifier and Type | Method and Description |
---|---|
protected abstract boolean |
cacheTableDescriptor() |
protected abstract boolean |
canCreateBaseZNode() |
protected abstract boolean |
canUpdateTableDescriptor() |
protected void |
closeClusterConnection() |
protected void |
closeTableDescriptors() |
protected void |
closeZooKeeper() |
protected abstract boolean |
clusterMode() |
protected abstract void |
configureInfoServer(InfoServer infoServer) |
Connection |
createConnection(org.apache.hadoop.conf.Configuration conf) |
protected abstract NamedQueueRecorder |
createNamedQueueRecord() |
protected abstract R |
createRpcServices() |
AccessChecker |
getAccessChecker() |
AsyncClusterConnection |
getAsyncClusterConnection()
Returns a reference to the servers' async cluster connection.
|
ChoreService |
getChoreService()
Returns The
ChoreService instance for this server |
org.apache.hadoop.conf.Configuration |
getConfiguration()
Gets the configuration object for this server.
|
ConfigurationManager |
getConfigurationManager() |
CoordinatedStateManager |
getCoordinatedStateManager()
Get CoordinatedStateManager instance for this server.
|
org.apache.hadoop.fs.Path |
getDataRootDir()
Returns Return the rootDir.
|
protected abstract Class<? extends javax.servlet.http.HttpServlet> |
getDumpServlet() |
NettyEventLoopGroupConfig |
getEventLoopGroupConfig() |
ExecutorService |
getExecutorService() |
org.apache.hadoop.fs.FileSystem |
getFileSystem()
Returns Return the FileSystem object used (can return null!).
|
InfoServer |
getInfoServer() |
MetaRegionLocationCache |
getMetaRegionLocationCache() |
int |
getMsgInterval() |
NamedQueueRecorder |
getNamedQueueRecorder()
get NamedQueue Provider to add different logs to ringbuffer
|
protected abstract String |
getProcessName() |
RpcServerInterface |
getRpcServer() |
R |
getRpcServices() |
ServerName |
getServerName()
Returns The unique server name for this server.
|
long |
getStartcode()
Returns time stamp in millis of when this server was started
|
TableDescriptors |
getTableDescriptors()
Returns Return table descriptors implementation.
|
protected abstract String |
getUseThisHostnameInstead(org.apache.hadoop.conf.Configuration conf) |
org.apache.hadoop.fs.FileSystem |
getWALFileSystem()
Returns Return the walFs.
|
org.apache.hadoop.fs.Path |
getWALRootDir()
Returns Return the walRootDir.
|
ZKPermissionWatcher |
getZKPermissionWatcher() |
ZKWatcher |
getZooKeeper()
Gets the ZooKeeper instance for this server.
|
protected void |
initializeFileSystem() |
protected void |
initializeMemStoreChunkCreator(HeapMemoryManager hMemManager) |
protected void |
installShutdownHook()
In order to register ShutdownHook, this method is called when HMaster and HRegionServer are
started.
|
boolean |
isAborted()
Check if the server or client was aborted.
|
boolean |
isClusterUp()
Returns True if the cluster is up.
|
boolean |
isShutdownHookInstalled() |
boolean |
isStopped()
Returns True if
Stoppable.stop(String) has been closed. |
protected abstract void |
login(UserProvider user,
String host) |
private void |
putUpWebUI()
Puts up the webui.
|
protected boolean |
setAbortRequested()
Sets the abort state if not already set.
|
protected void |
setupClusterConnection()
Setup our cluster connection if not already initialized.
|
private static void |
setupWindows(org.apache.hadoop.conf.Configuration conf,
ConfigurationManager cm)
If running on Windows, do windows-specific setup.
|
protected void |
shutdownChore(ScheduledChore chore) |
protected abstract void |
stopChores() |
protected void |
stopChoreService() |
protected void |
stopExecutorService() |
protected void |
stopInfoServer() |
String |
toString() |
void |
updateConfiguration()
Reload the configuration from disk.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAsyncConnection, getConnection, isStopping
onConfigurationChange
getActiveMaster, getBackupMasters, getBootstrapNodes, getClusterId, getMetaLocations
private static final org.slf4j.Logger LOG
protected final org.apache.hadoop.conf.Configuration conf
protected final AtomicBoolean abortRequested
protected volatile boolean stopped
private boolean isShutdownHookInstalled
protected final long startcode
protected final UserProvider userProvider
protected ServerName serverName
protected final R extends HBaseRpcServicesBase<?> rpcServices
protected final String useThisHostnameInstead
protected final NamedQueueRecorder namedQueueRecorder
protected final ConfigurationManager configurationManager
protected final ChoreService choreService
protected final ExecutorService executorService
protected final ClusterStatusTracker clusterStatusTracker
protected final CoordinatedStateManager csm
protected InfoServer infoServer
protected HFileSystem dataFs
protected HFileSystem walFs
protected org.apache.hadoop.fs.Path dataRootDir
protected org.apache.hadoop.fs.Path walRootDir
protected final int msgInterval
protected TableDescriptors tableDescriptors
protected AsyncClusterConnection asyncClusterConnection
protected final MetaRegionLocationCache metaRegionLocationCache
protected final NettyEventLoopGroupConfig eventLoopGroupConfig
public HBaseServerBase(org.apache.hadoop.conf.Configuration conf, String name) throws IOException
IOException
private static void setupWindows(org.apache.hadoop.conf.Configuration conf, ConfigurationManager cm)
protected final void setupClusterConnection() throws IOException
IOException
protected final void initializeFileSystem() throws IOException
IOException
private void putUpWebUI() throws IOException
IOException
protected final boolean setAbortRequested()
public boolean isStopped()
Stoppable
Stoppable.stop(String)
has been closed.public boolean isAborted()
Abortable
public org.apache.hadoop.conf.Configuration getConfiguration()
Server
getConfiguration
in interface Server
public AsyncClusterConnection getAsyncClusterConnection()
Server
getAsyncClusterConnection
in interface Server
public ZKWatcher getZooKeeper()
Server
getZooKeeper
in interface Server
protected final void shutdownChore(ScheduledChore chore)
protected final void initializeMemStoreChunkCreator(HeapMemoryManager hMemManager)
protected abstract void stopChores()
protected final void stopChoreService()
protected final void stopExecutorService()
protected final void closeClusterConnection()
protected final void stopInfoServer()
protected final void closeZooKeeper()
protected final void closeTableDescriptors()
protected final void installShutdownHook()
public boolean isShutdownHookInstalled()
public ServerName getServerName()
Server
getServerName
in interface Server
public ChoreService getChoreService()
Server
ChoreService
instance for this servergetChoreService
in interface Server
public TableDescriptors getTableDescriptors()
public ExecutorService getExecutorService()
public AccessChecker getAccessChecker()
public ZKPermissionWatcher getZKPermissionWatcher()
public CoordinatedStateManager getCoordinatedStateManager()
Server
getCoordinatedStateManager
in interface Server
public Connection createConnection(org.apache.hadoop.conf.Configuration conf) throws IOException
createConnection
in interface Server
IOException
public org.apache.hadoop.fs.Path getDataRootDir()
public org.apache.hadoop.fs.FileSystem getFileSystem()
Server
getFileSystem
in interface Server
public org.apache.hadoop.fs.Path getWALRootDir()
public org.apache.hadoop.fs.FileSystem getWALFileSystem()
public boolean isClusterUp()
public long getStartcode()
public InfoServer getInfoServer()
public int getMsgInterval()
public NamedQueueRecorder getNamedQueueRecorder()
public RpcServerInterface getRpcServer()
public NettyEventLoopGroupConfig getEventLoopGroupConfig()
public R getRpcServices()
public MetaRegionLocationCache getMetaRegionLocationCache()
public ConfigurationManager getConfigurationManager()
public void updateConfiguration()
protected abstract boolean canCreateBaseZNode()
protected abstract String getProcessName()
protected abstract R createRpcServices() throws IOException
IOException
protected abstract String getUseThisHostnameInstead(org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
protected abstract void login(UserProvider user, String host) throws IOException
IOException
protected abstract NamedQueueRecorder createNamedQueueRecord()
protected abstract void configureInfoServer(InfoServer infoServer)
protected abstract Class<? extends javax.servlet.http.HttpServlet> getDumpServlet()
protected abstract boolean canUpdateTableDescriptor()
protected abstract boolean cacheTableDescriptor()
protected abstract boolean clusterMode()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.