Class TopCLI

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

public class TopCLI extends YarnCLI
  • Field Details

    • applicationReportsCache

      protected org.apache.hadoop.thirdparty.com.google.common.cache.Cache<org.apache.hadoop.yarn.api.protocolrecords.GetApplicationsRequest,List<org.apache.hadoop.yarn.api.records.ApplicationReport>> applicationReportsCache
    • AppIDComparator

      public static final Comparator<org.apache.hadoop.yarn.client.cli.TopCLI.ApplicationInformation> AppIDComparator
    • UserComparator

      public static final Comparator<org.apache.hadoop.yarn.client.cli.TopCLI.ApplicationInformation> UserComparator
    • AppTypeComparator

      public static final Comparator<org.apache.hadoop.yarn.client.cli.TopCLI.ApplicationInformation> AppTypeComparator
    • QueueNameComparator

      public static final Comparator<org.apache.hadoop.yarn.client.cli.TopCLI.ApplicationInformation> QueueNameComparator
    • UsedContainersComparator

      public static final Comparator<org.apache.hadoop.yarn.client.cli.TopCLI.ApplicationInformation> UsedContainersComparator
    • ReservedContainersComparator

      public static final Comparator<org.apache.hadoop.yarn.client.cli.TopCLI.ApplicationInformation> ReservedContainersComparator
    • UsedMemoryComparator

      public static final Comparator<org.apache.hadoop.yarn.client.cli.TopCLI.ApplicationInformation> UsedMemoryComparator
    • ReservedMemoryComparator

      public static final Comparator<org.apache.hadoop.yarn.client.cli.TopCLI.ApplicationInformation> ReservedMemoryComparator
    • UsedVCoresComparator

      public static final Comparator<org.apache.hadoop.yarn.client.cli.TopCLI.ApplicationInformation> UsedVCoresComparator
    • ReservedVCoresComparator

      public static final Comparator<org.apache.hadoop.yarn.client.cli.TopCLI.ApplicationInformation> ReservedVCoresComparator
    • VCoreSecondsComparator

      public static final Comparator<org.apache.hadoop.yarn.client.cli.TopCLI.ApplicationInformation> VCoreSecondsComparator
    • MemorySecondsComparator

      public static final Comparator<org.apache.hadoop.yarn.client.cli.TopCLI.ApplicationInformation> MemorySecondsComparator
    • ProgressComparator

      public static final Comparator<org.apache.hadoop.yarn.client.cli.TopCLI.ApplicationInformation> ProgressComparator
    • RunningTimeComparator

      public static final Comparator<org.apache.hadoop.yarn.client.cli.TopCLI.ApplicationInformation> RunningTimeComparator
    • AppNameComparator

      public static final Comparator<org.apache.hadoop.yarn.client.cli.TopCLI.ApplicationInformation> AppNameComparator
    • AppPriorityComparator

      public static final Comparator<org.apache.hadoop.yarn.client.cli.TopCLI.ApplicationInformation> AppPriorityComparator
  • Constructor Details

  • Method Details

    • main

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

      public int run(String[] args) throws Exception
      Throws:
      Exception
    • setTerminalSequences

      protected void setTerminalSequences() throws IOException, InterruptedException
      Throws:
      IOException
      InterruptedException
    • getNodesInfo

      protected org.apache.hadoop.yarn.client.cli.TopCLI.NodesInformation getNodesInfo()
    • getQueueMetrics

      protected org.apache.hadoop.yarn.client.cli.TopCLI.QueueMetrics getQueueMetrics()
    • getHAClusterUrl

      @VisibleForTesting public URL getHAClusterUrl(org.apache.hadoop.conf.Configuration conf, String rmhid) throws MalformedURLException
      Throws:
      MalformedURLException
    • clearScreen

      protected void clearScreen()
    • clearScreenWithoutScroll

      protected void clearScreenWithoutScroll()
    • printHeader

      protected void printHeader(String header)
    • printApps

      protected void printApps(String appInfo)
    • showFieldsScreen

      protected void showFieldsScreen()
    • fetchAppReports

      protected List<org.apache.hadoop.yarn.api.records.ApplicationReport> fetchAppReports() throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
      Throws:
      org.apache.hadoop.yarn.exceptions.YarnException
      IOException