You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by GitBox <gi...@apache.org> on 2022/10/12 22:21:47 UTC
[GitHub] [hadoop] slfan1989 commented on a diff in pull request #5009: YARN-11327. [Federation] Refactoring Yarn Router's Node Web Page.
slfan1989 commented on code in PR #5009:
URL: https://github.com/apache/hadoop/pull/5009#discussion_r993943062
##########
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/main/java/org/apache/hadoop/yarn/server/router/webapp/NodesBlock.java:
##########
@@ -31,38 +35,95 @@
import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY;
import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TR;
import org.apache.hadoop.yarn.webapp.util.WebAppUtils;
-import org.apache.hadoop.yarn.webapp.view.HtmlBlock;
import com.google.inject.Inject;
+import java.util.List;
+
+import static org.apache.hadoop.yarn.webapp.YarnWebParams.NODE_SC;
+
/**
* Nodes block for the Router Web UI.
*/
-public class NodesBlock extends HtmlBlock {
-
- private static final long BYTES_IN_MB = 1024 * 1024;
+public class NodesBlock extends RouterBlock {
private final Router router;
@Inject
NodesBlock(Router router, ViewContext ctx) {
- super(ctx);
+ super(router, ctx);
this.router = router;
}
@Override
protected void render(Block html) {
- // Get the node info from the federation
+
+ boolean isEnabled = isYarnFederationEnabled();
+
+ // If Yarn Federation is not enabled, the user needs to be prompted.
+ initUserHelpInformationDiv(html, isEnabled);
Review Comment:
Thank you very much for your help reviewing the code, I agree with you, I will modify the code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org