Class RouterBlock

java.lang.Object
org.apache.hadoop.yarn.webapp.View
org.apache.hadoop.yarn.webapp.view.TextView
org.apache.hadoop.yarn.webapp.view.HtmlBlock
org.apache.hadoop.yarn.server.router.webapp.RouterBlock
All Implemented Interfaces:
org.apache.hadoop.yarn.webapp.Params, org.apache.hadoop.yarn.webapp.SubView
Direct Known Subclasses:
AboutBlock, AppsBlock, MetricsOverviewTable, NavBlock, NodeLabelsBlock, NodesBlock

public abstract class RouterBlock extends org.apache.hadoop.yarn.webapp.view.HtmlBlock
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.hadoop.yarn.webapp.view.HtmlBlock

    org.apache.hadoop.yarn.webapp.view.HtmlBlock.Block

    Nested classes/interfaces inherited from class org.apache.hadoop.yarn.webapp.View

    org.apache.hadoop.yarn.webapp.View.ViewContext
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class org.apache.hadoop.yarn.webapp.view.HtmlBlock

    BYTES_IN_MB, DATE_PATTERN, UNAVAILABLE

    Fields inherited from class org.apache.hadoop.yarn.webapp.View

    LOG

    Fields inherited from interface org.apache.hadoop.yarn.webapp.Params

    ERROR_DETAILS, TITLE, TITLE_LINK, USER
  • Constructor Summary

    Constructors
    Constructor
    Description
    RouterBlock(Router router, org.apache.hadoop.yarn.webapp.View.ViewContext ctx)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected List<String>
    Get a list of SubClusterIds for ActiveSubClusters.
    protected org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo
    Get RouterClusterMetrics Info.
    protected org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo
    Get ClusterMetricsInfo By SubClusterId.
    org.apache.hadoop.yarn.server.federation.utils.FederationStateStoreFacade
     
    protected org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo
    Get RouterClusterMetrics Info.
    protected org.apache.hadoop.yarn.server.federation.store.records.SubClusterInfo
    getSubClusterInfoByLocalCluster(org.apache.hadoop.conf.Configuration config)
    Generate SubClusterInfo based on local cluster information.
    protected List<org.apache.hadoop.yarn.server.federation.store.records.SubClusterInfo>
    Get a list of subclusters.
    protected Collection<org.apache.hadoop.yarn.server.federation.store.records.SubClusterInfo>
    Get SubClusterInfo based on subclusterId.
    protected void
    initApplicationsMenu(org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.UL<org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV<org.apache.hadoop.yarn.webapp.hamlet2.Hamlet>> mainList, List<String> subClusterIds)
    Initialize the Applications menu.
    protected void
    initNodeLabelsMenu(org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.UL<org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV<org.apache.hadoop.yarn.webapp.hamlet2.Hamlet>> mainList, List<String> subClusterIds)
    Initialize the NodeLabels menu.
    protected void
    initNodesMenu(org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.UL<org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV<org.apache.hadoop.yarn.webapp.hamlet2.Hamlet>> mainList, List<String> subClusterIds)
    Initialize the Nodes menu.
    protected void
    initSubClusterMetricsOverviewTable(org.apache.hadoop.yarn.webapp.view.HtmlBlock.Block html, String subclusterId)
    init SubCluster MetricsOverviewTable.
    protected boolean
    Whether Yarn Federation is enabled.

    Methods inherited from class org.apache.hadoop.yarn.webapp.view.HtmlBlock

    getCallerUGI, initUserHelpInformationDiv, render, render, renderPartial

    Methods inherited from class org.apache.hadoop.yarn.webapp.view.TextView

    echo, echoWithoutEscapeHtml, puts, putWithoutEscapeHtml, writer

    Methods inherited from class org.apache.hadoop.yarn.webapp.View

    $, $, context, cookies, error, getInstance, inDevMode, info, injector, moreParams, outputStream, prefix, render, request, response, root, root_url, set, setTitle, setTitle, status, url

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • RouterBlock

      public RouterBlock(Router router, org.apache.hadoop.yarn.webapp.View.ViewContext ctx)
  • Method Details

    • getRouterClusterMetricsInfo

      protected org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo getRouterClusterMetricsInfo()
      Get RouterClusterMetrics Info.
      Returns:
      Router ClusterMetricsInfo.
    • getClusterMetricsInfo

      protected org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo getClusterMetricsInfo(String webAppAddress)
      Get RouterClusterMetrics Info.
      Parameters:
      webAppAddress - webAppAddress.
      Returns:
      ClusterMetricsInfo.
    • getSubClusterInfoList

      protected List<org.apache.hadoop.yarn.server.federation.store.records.SubClusterInfo> getSubClusterInfoList()
      Get a list of subclusters.
      Returns:
      subcluster List.
    • isYarnFederationEnabled

      protected boolean isYarnFederationEnabled()
      Whether Yarn Federation is enabled.
      Returns:
      true, enable yarn federation; false, not enable yarn federation;
    • getActiveSubClusterIds

      protected List<String> getActiveSubClusterIds()
      Get a list of SubClusterIds for ActiveSubClusters.
      Returns:
      list of SubClusterIds.
    • initSubClusterMetricsOverviewTable

      protected void initSubClusterMetricsOverviewTable(org.apache.hadoop.yarn.webapp.view.HtmlBlock.Block html, String subclusterId)
      init SubCluster MetricsOverviewTable.
      Parameters:
      html - HTML Object.
      subclusterId - subClusterId
    • getClusterMetricsInfoBySubClusterId

      protected org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfo getClusterMetricsInfoBySubClusterId(String subclusterId)
      Get ClusterMetricsInfo By SubClusterId.
      Parameters:
      subclusterId - subClusterId
      Returns:
      SubCluster RM ClusterMetricsInfo
    • getSubClusterInfoList

      protected Collection<org.apache.hadoop.yarn.server.federation.store.records.SubClusterInfo> getSubClusterInfoList(String subclusterId)
      Get SubClusterInfo based on subclusterId.
      Parameters:
      subclusterId - subCluster Id
      Returns:
      SubClusterInfo Collection
    • getFacade

      public org.apache.hadoop.yarn.server.federation.utils.FederationStateStoreFacade getFacade()
    • initNodesMenu

      protected void initNodesMenu(org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.UL<org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV<org.apache.hadoop.yarn.webapp.hamlet2.Hamlet>> mainList, List<String> subClusterIds)
      Initialize the Nodes menu.
      Parameters:
      mainList - HTML Object.
      subClusterIds - subCluster List.
    • initApplicationsMenu

      protected void initApplicationsMenu(org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.UL<org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV<org.apache.hadoop.yarn.webapp.hamlet2.Hamlet>> mainList, List<String> subClusterIds)
      Initialize the Applications menu.
      Parameters:
      mainList - HTML Object.
      subClusterIds - subCluster List.
    • initNodeLabelsMenu

      protected void initNodeLabelsMenu(org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.UL<org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV<org.apache.hadoop.yarn.webapp.hamlet2.Hamlet>> mainList, List<String> subClusterIds)
      Initialize the NodeLabels menu.
      Parameters:
      mainList - HTML Object.
      subClusterIds - subCluster List.
    • getSubClusterInfoByLocalCluster

      protected org.apache.hadoop.yarn.server.federation.store.records.SubClusterInfo getSubClusterInfoByLocalCluster(org.apache.hadoop.conf.Configuration config)
      Generate SubClusterInfo based on local cluster information.
      Parameters:
      config - Configuration.
      Returns:
      SubClusterInfo.