Class RMAdminCLI

java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.ha.HAAdmin
org.apache.hadoop.yarn.client.cli.RMAdminCLI
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

@Private @Unstable public class RMAdminCLI extends org.apache.hadoop.ha.HAAdmin
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.hadoop.ha.HAAdmin

    org.apache.hadoop.ha.HAAdmin.UsageInfo
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final Map<String,org.apache.hadoop.ha.HAAdmin.UsageInfo>
     

    Fields inherited from class org.apache.hadoop.ha.HAAdmin

    errOut, FORCEACTIVE, FORCEMANUAL, out, USAGE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    RMAdminCLI(org.apache.hadoop.conf.Configuration conf)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.apache.hadoop.yarn.server.api.ResourceManagerAdministrationProtocol
     
    protected static org.apache.hadoop.yarn.nodelabels.CommonNodeLabelsManager
    getNodeLabelManagerInstance(org.apache.hadoop.conf.Configuration conf)
     
    protected Collection<String>
    getTargetIds(String targetNodeToActivate)
    returns the list of all resourcemanager ids for the given configuration.
    protected String
     
    static void
    main(String[] args)
     
    protected String
    parseSubClusterId(String[] args, boolean isHAEnabled)
     
    protected String
    parseSubClusterId(org.apache.commons.cli.CommandLine cliParser)
    Parse subClusterId.
    protected org.apache.hadoop.ha.HAServiceTarget
     
    int
    run(String[] args)
     
    void
    setConf(org.apache.hadoop.conf.Configuration conf)
     
    protected void
     
    protected void
     

    Methods inherited from class org.apache.hadoop.ha.HAAdmin

    checkManualStateManagementOK, checkParameterValidity, checkParameterValidity, confirmForceManual, createReqInfo, getAllServiceState, getRequestSource, getServiceAddr, gracefulFailoverThroughZKFCs, help, help, parseOpts, parseOpts, printUsage, printUsage, printUsage, printUsage, runCmd, setRequestSource

    Methods inherited from class org.apache.hadoop.conf.Configured

    getConf

    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
  • Field Details

    • ADMIN_USAGE

      protected static final Map<String,org.apache.hadoop.ha.HAAdmin.UsageInfo> ADMIN_USAGE
  • Constructor Details

    • RMAdminCLI

      public RMAdminCLI()
    • RMAdminCLI

      public RMAdminCLI(org.apache.hadoop.conf.Configuration conf)
  • Method Details

    • setErrOut

      protected void setErrOut(PrintStream errOut)
    • setOut

      protected void setOut(PrintStream out)
    • createAdminProtocol

      protected org.apache.hadoop.yarn.server.api.ResourceManagerAdministrationProtocol createAdminProtocol() throws IOException
      Throws:
      IOException
    • getNodeLabelManagerInstance

      protected static org.apache.hadoop.yarn.nodelabels.CommonNodeLabelsManager getNodeLabelManagerInstance(org.apache.hadoop.conf.Configuration conf)
    • run

      public int run(String[] args) throws Exception
      Specified by:
      run in interface org.apache.hadoop.util.Tool
      Overrides:
      run in class org.apache.hadoop.ha.HAAdmin
      Throws:
      Exception
    • setConf

      public void setConf(org.apache.hadoop.conf.Configuration conf)
      Specified by:
      setConf in interface org.apache.hadoop.conf.Configurable
      Overrides:
      setConf in class org.apache.hadoop.ha.HAAdmin
    • resolveTarget

      protected org.apache.hadoop.ha.HAServiceTarget resolveTarget(String rmId)
      Specified by:
      resolveTarget in class org.apache.hadoop.ha.HAAdmin
    • getTargetIds

      protected Collection<String> getTargetIds(String targetNodeToActivate)
      returns the list of all resourcemanager ids for the given configuration.
      Overrides:
      getTargetIds in class org.apache.hadoop.ha.HAAdmin
    • getUsageString

      protected String getUsageString()
      Overrides:
      getUsageString in class org.apache.hadoop.ha.HAAdmin
    • parseSubClusterId

      protected String parseSubClusterId(org.apache.commons.cli.CommandLine cliParser)
      Parse subClusterId. This method will only parse subClusterId when Yarn Federation mode is enabled.
      Parameters:
      cliParser - CommandLine.
      Returns:
      subClusterId.
    • parseSubClusterId

      protected String parseSubClusterId(String[] args, boolean isHAEnabled)
    • main

      public static void main(String[] args) throws Exception
      Throws:
      Exception