[ https://issues.apache.org/jira/browse/YARN-11310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17608418#comment-17608418 ]
ASF GitHub Bot commented on YARN-11310: --------------------------------------- slfan1989 commented on code in PR #4924: URL: https://github.com/apache/hadoop/pull/4924#discussion_r978076679 ########## hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/FederationBlock.java: ########## @@ -58,119 +58,195 @@ class FederationBlock extends HtmlBlock { @Override public void render(Block html) { + Configuration conf = this.router.getConfig(); - boolean isEnabled = conf.getBoolean( - YarnConfiguration.FEDERATION_ENABLED, + boolean isEnabled = conf.getBoolean(YarnConfiguration.FEDERATION_ENABLED, YarnConfiguration.DEFAULT_FEDERATION_ENABLED); + if (isEnabled) { - setTitle("Federation"); + + List<Map<String, String>> lists = new ArrayList<>(); // Table header - TBODY<TABLE<Hamlet>> tbody = html.table("#rms").thead().tr() + TBODY<TABLE<Hamlet>> tbody = + html.table("#rms").$class("display").$style("width:100%").thead().tr() .th(".id", "SubCluster") - .th(".submittedA", "Applications Submitted*") - .th(".pendingA", "Applications Pending*") - .th(".runningA", "Applications Running*") - .th(".failedA", "Applications Failed*") - .th(".killedA", "Applications Killed*") - .th(".completedA", "Applications Completed*") - .th(".contAllocated", "Containers Allocated") - .th(".contReserved", "Containers Reserved") - .th(".contPending", "Containers Pending") - .th(".availableM", "Available Memory") - .th(".allocatedM", "Allocated Memory") Review Comment: This information is preserved and will be set in `initFederationBlockTableJs`. For the Federation page, as a user, I first want to know the running status of the SubCluster, and then I care about the capacity information of the cluster. I have made some changes to the information in the displayed list, firstly showing ``` 1.subClusterId 2.subClusterName 3.lastStartTime 4.lastHeartBeat 5.resources info 6.nodes info ``` When we click on the cluster id field, the metric information of the cluster will be displayed, which are divided into Application Metric, Resource Metric, and Node Metric. When we click on the cluster id field, the metric information of the cluster will be displayed, which are Application Metric, Resource Metric, and Node Metric. When we click on the cluster id again, these information can be hidden, and only the most basic SubCluster status is exposed. > [Yarn Federation] Refactoring Router's Federation Web Page > ---------------------------------------------------------- > > Key: YARN-11310 > URL: https://issues.apache.org/jira/browse/YARN-11310 > Project: Hadoop YARN > Issue Type: Improvement > Components: federation > Affects Versions: 3.4.0 > Reporter: fanshilun > Assignee: fanshilun > Priority: Major > Labels: pull-request-available > Attachments: Federation_Web_Page.gif, > image-2022-09-22-11-43-27-954.png, image-2022-09-22-11-49-10-974.png, > image-2022-09-22-11-52-50-188.png, image-2022-09-22-11-55-08-113.png > > > The Yarn Federation page before modification is as follows: > enable federation: > !image-2022-09-22-11-43-27-954.png|width=952,height=232! > federation is not enabled > !image-2022-09-22-11-49-10-974.png|width=958,height=209! > > The page needs to be optimized as follows: > 1. Title is inaccurate, should be "About The Federation" > 2.If the user does not configure federation.enable, the page should prompt > information instead of showing blank. > 3.For cluster information, we care more about the current sub-cluster status, > registration time, heartbeat time, etc., rather than capacity information. > > enable federation: > !image-2022-09-22-11-52-50-188.png|width=736,height=320! > federation is not enabled > !image-2022-09-22-11-55-08-113.png|width=733,height=211! > > -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org