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.BlockNested classes/interfaces inherited from class org.apache.hadoop.yarn.webapp.View
org.apache.hadoop.yarn.webapp.View.ViewContext -
Field Summary
FieldsFields inherited from class org.apache.hadoop.yarn.webapp.view.HtmlBlock
BYTES_IN_MB, DATE_PATTERN, UNAVAILABLEFields inherited from class org.apache.hadoop.yarn.webapp.View
LOGFields inherited from interface org.apache.hadoop.yarn.webapp.Params
ERROR_DETAILS, TITLE, TITLE_LINK, USER -
Constructor Summary
ConstructorsConstructorDescriptionRouterBlock(Router router, org.apache.hadoop.yarn.webapp.View.ViewContext ctx) -
Method Summary
Modifier and TypeMethodDescriptionGet a list of SubClusterIds for ActiveSubClusters.protected org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfogetClusterMetricsInfo(String webAppAddress) Get RouterClusterMetrics Info.protected org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfogetClusterMetricsInfoBySubClusterId(String subclusterId) Get ClusterMetricsInfo By SubClusterId.org.apache.hadoop.yarn.server.federation.utils.FederationStateStoreFacadeprotected org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.ClusterMetricsInfoGet RouterClusterMetrics Info.protected org.apache.hadoop.yarn.server.federation.store.records.SubClusterInfogetSubClusterInfoByLocalCluster(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>getSubClusterInfoList(String subclusterId) Get SubClusterInfo based on subclusterId.protected voidinitApplicationsMenu(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 voidinitNodeLabelsMenu(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 voidinitNodesMenu(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 voidinitSubClusterMetricsOverviewTable(org.apache.hadoop.yarn.webapp.view.HtmlBlock.Block html, String subclusterId) init SubCluster MetricsOverviewTable.protected booleanWhether Yarn Federation is enabled.Methods inherited from class org.apache.hadoop.yarn.webapp.view.HtmlBlock
getCallerUGI, initUserHelpInformationDiv, render, render, renderPartialMethods inherited from class org.apache.hadoop.yarn.webapp.view.TextView
echo, echoWithoutEscapeHtml, puts, putWithoutEscapeHtml, writerMethods 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
-
Field Details
-
ROUTER
- See Also:
-
-
Constructor Details
-
RouterBlock
-
-
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
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.
-