org.apache.hadoop.hbase.util
Class ServerCommandLine

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.hadoop.hbase.util.ServerCommandLine
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool
Direct Known Subclasses:
HMasterCommandLine, HRegionServerCommandLine

@InterfaceAudience.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.


Constructor Summary
ServerCommandLine()
           
 
Method Summary
 void doMain(String[] args)
          Parse and run the given command line.
protected abstract  String getUsage()
          Implementing subclasses should return a usage string to print out.
static void logJVMInfo()
          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 usage(String message)
          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.util.Tool
run
 
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
 

Constructor Detail

ServerCommandLine

public ServerCommandLine()
Method Detail

getUsage

protected abstract String getUsage()
Implementing subclasses should return a usage string to print out.


usage

protected void usage(String message)
Print usage information for this command line.

Parameters:
message - if not null, print this message before the usage info.

logJVMInfo

public static void logJVMInfo()
Log information about the currently running JVM.


logProcessInfo

public static void logProcessInfo(org.apache.hadoop.conf.Configuration conf)
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

public void doMain(String[] args)
Parse and run the given command line. This may exit the JVM if a nonzero exit code is returned from run().



Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.