goiri commented on code in PR #5009:
URL: https://github.com/apache/hadoop/pull/5009#discussion_r993772479
##########
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:
Well, technically this is only in the Router?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]