Package org.apache.hadoop.hbase.util
Class ServerCommandLine
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hbase.util.ServerCommandLine
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable
,org.apache.hadoop.util.Tool
- Direct Known Subclasses:
HMasterCommandLine
,HRegionServerCommandLine
@Private
public abstract class ServerCommandLine
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
Base class for command lines that start up various HBase daemons.
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Parse and run the given command line.protected abstract String
getUsage()
Implementing subclasses should return a usage string to print out.private static void
logHBaseConfigs
(org.apache.hadoop.conf.Configuration conf) Print into log some of the important hbase attributes.static void
Log information about the currently running JVM.static void
logProcessInfo
(org.apache.hadoop.conf.Configuration conf) Logs information about the currently running JVM process including the environment variables.protected void
Print usage information for this command line.Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
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.conf.Configurable
getConf, setConf
Methods inherited from interface org.apache.hadoop.util.Tool
run
-
Field Details
-
LOG
-
DEFAULT_SKIP_WORDS
-
-
Constructor Details
-
ServerCommandLine
public ServerCommandLine()
-
-
Method Details
-
getUsage
Implementing subclasses should return a usage string to print out. -
usage
Print usage information for this command line.- Parameters:
message
- if not null, print this message before the usage info.
-
logJVMInfo
Log information about the currently running JVM. -
logHBaseConfigs
Print into log some of the important hbase attributes. -
logProcessInfo
Logs information about the currently running JVM process including the environment variables. Logging of env vars can be disabled by setting"hbase.envvars.logging.disabled"
to"true"
.If enabled, you can also exclude environment variables containing certain substrings by setting
"hbase.envvars.logging.skipwords"
to comma separated list of such substrings. -
doMain
Parse and run the given command line. This will exit the JVM with the exit code returned fromrun()
. If return code is 0, wait for atmost 30 seconds for all non-daemon threads to quit, otherwise exit the jvm
-