http://git-wip-us.apache.org/repos/asf/hadoop/blob/38c6fa5c/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppAttemptBlock.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppAttemptBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppAttemptBlock.java index 40e1e94..82ddb54 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppAttemptBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppAttemptBlock.java @@ -45,10 +45,10 @@ import org.apache.hadoop.yarn.server.webapp.AppAttemptBlock; import org.apache.hadoop.yarn.server.webapp.dao.AppAttemptInfo; import org.apache.hadoop.yarn.util.Times; import org.apache.hadoop.yarn.util.resource.Resources; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; import org.apache.hadoop.yarn.webapp.util.WebAppUtils; import org.apache.hadoop.yarn.webapp.view.InfoBlock; @@ -86,7 +86,7 @@ public class RMAppAttemptBlock extends AppAttemptBlock{ .th(".resource", "ResourceName").th(".capacity", "Capability") .th(".containers", "NumContainers") .th(".relaxlocality", "RelaxLocality") - .th(".labelexpression", "NodeLabelExpression")._()._().tbody(); + .th(".labelexpression", "NodeLabelExpression").__().__().tbody(); StringBuilder resourceRequestTableData = new StringBuilder("[\n"); for (ResourceRequestInfo resourceRequest : resourceRequests) { @@ -114,9 +114,9 @@ public class RMAppAttemptBlock extends AppAttemptBlock{ } resourceRequestTableData.append("]"); html.script().$type("text/javascript") - ._("var resourceRequestsTableData=" + resourceRequestTableData)._(); - tbody._()._(); - div._(); + .__("var resourceRequestsTableData=" + resourceRequestTableData).__(); + tbody.__().__(); + div.__(); } private Resource getTotalResource(List<ResourceRequestInfo> requests) { @@ -163,7 +163,7 @@ public class RMAppAttemptBlock extends AppAttemptBlock{ th(_TH, "Node Local Request"). th(_TH, "Rack Local Request"). th(_TH, "Off Switch Request"). - _(); + __(); String[] containersType = { "Num Node Local Containers (satisfied by)", "Num Rack Local Containers (satisfied by)", @@ -173,10 +173,10 @@ public class RMAppAttemptBlock extends AppAttemptBlock{ table.tr((odd = !odd) ? _ODD : _EVEN).td(containersType[i]) .td(String.valueOf(attemptMetrics.getLocalityStatistics()[i][0])) .td(i == 0 ? "" : String.valueOf(attemptMetrics.getLocalityStatistics()[i][1])) - .td(i <= 1 ? "" : String.valueOf(attemptMetrics.getLocalityStatistics()[i][2]))._(); + .td(i <= 1 ? "" : String.valueOf(attemptMetrics.getLocalityStatistics()[i][2])).__(); } - table._(); - div._(); + table.__(); + div.__(); } private boolean isApplicationInFinalState(YarnApplicationAttemptState state) { @@ -192,12 +192,12 @@ public class RMAppAttemptBlock extends AppAttemptBlock{ if (!isApplicationInFinalState(YarnApplicationAttemptState .valueOf(attempt.getAppAttemptState().toString()))) { RMAppAttemptMetrics metrics = attempt.getRMAppAttemptMetrics(); - DIV<Hamlet> pdiv = html._(InfoBlock.class).div(_INFO_WRAP); + DIV<Hamlet> pdiv = html.__(InfoBlock.class).div(_INFO_WRAP); info("Application Attempt Overview").clear(); - info("Application Attempt Metrics")._( + info("Application Attempt Metrics").__( "Application Attempt Headroom : ", metrics == null ? "N/A" : metrics.getApplicationAttemptHeadroom()); - pdiv._(); + pdiv.__(); } } } @@ -226,23 +226,23 @@ public class RMAppAttemptBlock extends AppAttemptBlock{ .getBlacklistUpdates().getBlacklistAdditions()); info("Application Attempt Overview") - ._( + .__( "Application Attempt State:", appAttempt.getAppAttemptState() == null ? UNAVAILABLE : appAttempt .getAppAttemptState()) - ._("Started:", Times.format(appAttempt.getStartedTime())) - ._("Elapsed:", + .__("Started:", Times.format(appAttempt.getStartedTime())) + .__("Elapsed:", org.apache.hadoop.util.StringUtils.formatTime(Times.elapsed( appAttempt.getStartedTime(), appAttempt.getFinishedTime()))) - ._( + .__( "AM Container:", appAttempt.getAmContainerId() == null || containers == null || !hasAMContainer(appAttemptReport.getAMContainerId(), containers) ? null : root_url("container", appAttempt.getAmContainerId()), appAttempt.getAmContainerId() == null ? "N/A" : String.valueOf(appAttempt.getAmContainerId())) - ._("Node:", node) - ._( + .__("Node:", node) + .__( "Tracking URL:", appAttempt.getTrackingUrl() == null || appAttempt.getTrackingUrl().equals(UNAVAILABLE) ? null @@ -254,12 +254,12 @@ public class RMAppAttemptBlock extends AppAttemptBlock{ || appAttempt.getAppAttemptState() == YarnApplicationAttemptState.FAILED || appAttempt.getAppAttemptState() == YarnApplicationAttemptState.KILLED ? "History" : "ApplicationMaster") - ._( + .__( "Diagnostics Info:", appAttempt.getDiagnosticsInfo() == null ? "" : appAttempt .getDiagnosticsInfo()) - ._("Nodes blacklisted by the application:", appBlacklistedNodes) - ._("Nodes blacklisted by the system:", rmBlackListedNodes); + .__("Nodes blacklisted by the application:", appBlacklistedNodes) + .__("Nodes blacklisted by the system:", rmBlackListedNodes); } private String getNodeString(Collection<String> nodes) {
http://git-wip-us.apache.org/repos/asf/hadoop/blob/38c6fa5c/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppBlock.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppBlock.java index e5d6c16..cd04264 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppBlock.java @@ -37,8 +37,8 @@ import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttemptM import org.apache.hadoop.yarn.server.resourcemanager.webapp.dao.AppAttemptInfo; import org.apache.hadoop.yarn.server.webapp.AppBlock; import org.apache.hadoop.yarn.util.resource.Resources; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; import org.apache.hadoop.yarn.webapp.util.WebAppUtils; import org.apache.hadoop.yarn.webapp.view.InfoBlock; @@ -82,33 +82,33 @@ public class RMAppBlock extends AppBlock{ attemptMetrics == null ? 0 : attemptMetrics .getNumNonAMContainersPreempted(); DIV<Hamlet> pdiv = html. - _(InfoBlock.class). + __(InfoBlock.class). div(_INFO_WRAP); info("Application Overview").clear(); info("Application Metrics") - ._("Total Resource Preempted:", + .__("Total Resource Preempted:", appMetrics == null ? "N/A" : appMetrics.getResourcePreempted()) - ._("Total Number of Non-AM Containers Preempted:", + .__("Total Number of Non-AM Containers Preempted:", appMetrics == null ? "N/A" : appMetrics.getNumNonAMContainersPreempted()) - ._("Total Number of AM Containers Preempted:", + .__("Total Number of AM Containers Preempted:", appMetrics == null ? "N/A" : appMetrics.getNumAMContainersPreempted()) - ._("Resource Preempted from Current Attempt:", + .__("Resource Preempted from Current Attempt:", attemptResourcePreempted) - ._("Number of Non-AM Containers Preempted from Current Attempt:", + .__("Number of Non-AM Containers Preempted from Current Attempt:", attemptNumNonAMContainerPreempted) - ._("Aggregate Resource Allocation:", + .__("Aggregate Resource Allocation:", String.format("%d MB-seconds, %d vcore-seconds", appMetrics == null ? "N/A" : appMetrics.getMemorySeconds(), appMetrics == null ? "N/A" : appMetrics.getVcoreSeconds())) - ._("Aggregate Preempted Resource Allocation:", + .__("Aggregate Preempted Resource Allocation:", String.format("%d MB-seconds, %d vcore-seconds", appMetrics == null ? "N/A" : appMetrics.getPreemptedMemorySeconds(), appMetrics == null ? "N/A" : appMetrics.getPreemptedVcoreSeconds())); - pdiv._(); + pdiv.__(); } @Override @@ -122,7 +122,7 @@ public class RMAppBlock extends AppBlock{ .th(".appBlacklistednodes", "Nodes blacklisted by the application", "Nodes blacklisted by the app") .th(".rmBlacklistednodes", "Nodes blacklisted by the RM for the" - + " app", "Nodes blacklisted by the system")._()._().tbody(); + + " app", "Nodes blacklisted by the system").__().__().tbody(); RMApp rmApp = this.rm.getRMContext().getRMApps().get(this.appID); if (rmApp == null) { @@ -174,9 +174,9 @@ public class RMAppBlock extends AppBlock{ } attemptsTableData.append("]"); html.script().$type("text/javascript") - ._("var attemptsTableData=" + attemptsTableData)._(); + .__("var attemptsTableData=" + attemptsTableData).__(); - tbody._()._(); + tbody.__().__(); } @Override http://git-wip-us.apache.org/repos/asf/hadoop/blob/38c6fa5c/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppLogAggregationStatusBlock.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppLogAggregationStatusBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppLogAggregationStatusBlock.java index f7f7c97..c1f2e5e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppLogAggregationStatusBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppLogAggregationStatusBlock.java @@ -38,9 +38,9 @@ import org.apache.hadoop.yarn.server.resourcemanager.ResourceManager; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMAppImpl; import org.apache.hadoop.yarn.util.Apps; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.DIV; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.DIV; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; import org.apache.hadoop.yarn.webapp.view.HtmlBlock; import com.google.inject.Inject; @@ -87,28 +87,28 @@ public class RMAppLogAggregationStatusBlock extends HtmlBlock { tr(). th(_TH, "Log Aggregation Status"). th(_TH, "Description"). - _(); + __(); table_description.tr().td(LogAggregationStatus.DISABLED.name()) - .td("Log Aggregation is Disabled.")._(); + .td("Log Aggregation is Disabled.").__(); table_description.tr().td(LogAggregationStatus.NOT_START.name()) - .td("Log Aggregation does not Start.")._(); + .td("Log Aggregation does not Start.").__(); table_description.tr().td(LogAggregationStatus.RUNNING.name()) - .td("Log Aggregation is Running.")._(); + .td("Log Aggregation is Running.").__(); table_description.tr().td(LogAggregationStatus.RUNNING_WITH_FAILURE.name()) .td("Log Aggregation is Running, but has failures " - + "in previous cycles")._(); + + "in previous cycles").__(); table_description.tr().td(LogAggregationStatus.SUCCEEDED.name()) .td("Log Aggregation is Succeeded. All of the logs have been " - + "aggregated successfully.")._(); + + "aggregated successfully.").__(); table_description.tr().td(LogAggregationStatus.FAILED.name()) .td("Log Aggregation is Failed. At least one of the logs " - + "have not been aggregated.")._(); + + "have not been aggregated.").__(); table_description.tr().td(LogAggregationStatus.TIME_OUT.name()) .td("The application is finished, but the log aggregation status is " + "not updated for a long time. Not sure whether the log aggregation " - + "is finished or not.")._(); - table_description._(); - div_description._(); + + "is finished or not.").__(); + table_description.__(); + div_description.__(); RMApp rmApp = rm.getRMContext().getRMApps().get(appId); // Application Log aggregation status Table @@ -131,7 +131,7 @@ public class RMAppLogAggregationStatusBlock extends HtmlBlock { .th(_TH, "Last " + maxLogAggregationDiagnosticsInMemory + " Diagnostic Messages") .th(_TH, "Last " - + maxLogAggregationDiagnosticsInMemory + " Failure Messages")._(); + + maxLogAggregationDiagnosticsInMemory + " Failure Messages").__(); if (rmApp != null) { Map<NodeId, LogAggregationReport> logAggregationReports = @@ -152,11 +152,11 @@ public class RMAppLogAggregationStatusBlock extends HtmlBlock { .td(report.getKey().toString()) .td(status == null ? "N/A" : status.toString()) .td(message == null ? "N/A" : message) - .td(failureMessage == null ? "N/A" : failureMessage)._(); + .td(failureMessage == null ? "N/A" : failureMessage).__(); } } } - table._(); - div._(); + table.__(); + div.__(); } } http://git-wip-us.apache.org/repos/asf/hadoop/blob/38c6fa5c/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppsBlock.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppsBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppsBlock.java index 61674d2..ede71e3 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppsBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMAppsBlock.java @@ -35,11 +35,10 @@ import org.apache.hadoop.yarn.server.resourcemanager.rmapp.RMApp; import org.apache.hadoop.yarn.server.resourcemanager.rmapp.attempt.RMAppAttempt; import org.apache.hadoop.yarn.server.webapp.AppsBlock; import org.apache.hadoop.yarn.server.webapp.dao.AppInfo; -import org.apache.hadoop.yarn.util.ConverterUtils; import org.apache.hadoop.yarn.webapp.View; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TABLE; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.TBODY; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TABLE; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet.TBODY; import com.google.inject.Inject; @@ -72,8 +71,8 @@ public class RMAppsBlock extends AppsBlock { .th(".clusterPercentage", "% of Cluster") .th(".progress", "Progress") .th(".ui", "Tracking UI") - .th(".blacklisted", "Blacklisted Nodes")._() - ._().tbody(); + .th(".blacklisted", "Blacklisted Nodes").__() + .__().tbody(); StringBuilder appsTableData = new StringBuilder("[\n"); for (ApplicationReport appReport : appReports) { @@ -190,8 +189,8 @@ public class RMAppsBlock extends AppsBlock { } appsTableData.append("]"); html.script().$type("text/javascript") - ._("var appsTableData=" + appsTableData)._(); + .__("var appsTableData=" + appsTableData).__(); - tbody._()._(); + tbody.__().__(); } } http://git-wip-us.apache.org/repos/asf/hadoop/blob/38c6fa5c/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMErrorsAndWarningsPage.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMErrorsAndWarningsPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMErrorsAndWarningsPage.java index 216deeb..c2ac59d 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMErrorsAndWarningsPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RMErrorsAndWarningsPage.java @@ -31,7 +31,7 @@ public class RMErrorsAndWarningsPage extends RmView { } @Override - protected void preHead(Page.HTML<_> html) { + protected void preHead(Page.HTML<__> html) { commonPreHead(html); String title = "Errors and Warnings in the ResourceManager"; setTitle(title); http://git-wip-us.apache.org/repos/asf/hadoop/blob/38c6fa5c/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RedirectionErrorPage.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RedirectionErrorPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RedirectionErrorPage.java index beb0cca..d81e64d 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RedirectionErrorPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RedirectionErrorPage.java @@ -26,7 +26,7 @@ import org.apache.hadoop.yarn.webapp.YarnWebParams; * because of a redirection issue. */ public class RedirectionErrorPage extends RmView { - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { String aid = $(YarnWebParams.APPLICATION_ID); commonPreHead(html); http://git-wip-us.apache.org/repos/asf/hadoop/blob/38c6fa5c/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmView.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmView.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmView.java index 1a437f8..fc844f9 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmView.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmView.java @@ -33,7 +33,7 @@ public class RmView extends TwoColumnLayout { static final int MAX_FAST_ROWS = 1000; // inline js array @Override - protected void preHead(Page.HTML<_> html) { + protected void preHead(Page.HTML<__> html) { commonPreHead(html); set(DATATABLES_ID, "apps"); set(initID(DATATABLES, "apps"), initAppsTable()); @@ -45,7 +45,7 @@ public class RmView extends TwoColumnLayout { setTitle(sjoin(reqState, "Applications")); } - protected void commonPreHead(Page.HTML<_> html) { + protected void commonPreHead(Page.HTML<__> html) { set(ACCORDION_ID, "nav"); set(initID(ACCORDION, "nav"), "{autoHeight:false, active:0}"); } http://git-wip-us.apache.org/repos/asf/hadoop/blob/38c6fa5c/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/SchedulerPageUtil.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/SchedulerPageUtil.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/SchedulerPageUtil.java index 99c0565..8c2d271 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/SchedulerPageUtil.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/SchedulerPageUtil.java @@ -27,7 +27,7 @@ public class SchedulerPageUtil { private void reopenQueue(Block html) { html. script().$type("text/javascript"). - _("function reopenQueryNodes() {", + __("function reopenQueryNodes() {", " var currentParam = window.location.href.split('?');", " var tmpCurrentParam = currentParam;", " var queryQueuesString = '';", @@ -52,13 +52,13 @@ public class SchedulerPageUtil { " 'open_node.jstree' :function(e, data) { storeExpandedQueue(e, data); },", " 'close_node.jstree':function(e, data) { storeExpandedQueue(e, data); }", " });", - "}")._(); + "}").__(); } private void storeExpandedQueue (Block html) { html. script().$type("text/javascript"). - _("function storeExpandedQueue(e, data) {", + __("function storeExpandedQueue(e, data) {", " var OPEN_QUEUES = 'openQueues';", " var ACTION_OPEN = 'open';", " var ACTION_CLOSED = 'closed';", @@ -166,7 +166,7 @@ public class SchedulerPageUtil { " queryString = queryString + '#' + queueName;", " }", " return queryString;", - "}")._(); + "}").__(); } @Override protected void render(Block html) { http://git-wip-us.apache.org/repos/asf/hadoop/blob/38c6fa5c/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-sharedcachemanager/src/main/java/org/apache/hadoop/yarn/server/sharedcachemanager/webapp/SCMOverviewPage.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-sharedcachemanager/src/main/java/org/apache/hadoop/yarn/server/sharedcachemanager/webapp/SCMOverviewPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-sharedcachemanager/src/main/java/org/apache/hadoop/yarn/server/sharedcachemanager/webapp/SCMOverviewPage.java index 27944d3..cec085b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-sharedcachemanager/src/main/java/org/apache/hadoop/yarn/server/sharedcachemanager/webapp/SCMOverviewPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-sharedcachemanager/src/main/java/org/apache/hadoop/yarn/server/sharedcachemanager/webapp/SCMOverviewPage.java @@ -43,7 +43,7 @@ import com.google.inject.Inject; @Unstable public class SCMOverviewPage extends TwoColumnLayout { - @Override protected void preHead(Page.HTML<_> html) { + @Override protected void preHead(Page.HTML<__> html) { set(ACCORDION_ID, "nav"); set(initID(ACCORDION, "nav"), "{autoHeight:false, active:0}"); } @@ -60,9 +60,9 @@ public class SCMOverviewPage extends TwoColumnLayout { static private class SCMOverviewNavBlock extends HtmlBlock { @Override protected void render(Block html) { - html.div("#nav").h3("Tools").ul().li().a("/conf", "Configuration")._() - .li().a("/stacks", "Thread dump")._().li().a("/logs", "Logs")._() - .li().a("/metrics", "Metrics")._()._()._(); + html.div("#nav").h3("Tools").ul().li().a("/conf", "Configuration").__() + .li().a("/stacks", "Thread dump").__().li().a("/logs", "Logs").__() + .li().a("/metrics", "Metrics").__().__().__(); } } @@ -81,15 +81,15 @@ public class SCMOverviewPage extends TwoColumnLayout { CleanerMetrics.getInstance(), ClientSCMMetrics.getInstance(), SharedCacheUploaderMetrics.getInstance()); info("Shared Cache Manager overview"). - _("Started on:", Times.format(scm.getStartTime())). - _("Cache hits: ", metricsInfo.getCacheHits()). - _("Cache misses: ", metricsInfo.getCacheMisses()). - _("Cache releases: ", metricsInfo.getCacheReleases()). - _("Accepted uploads: ", metricsInfo.getAcceptedUploads()). - _("Rejected uploads: ", metricsInfo.getRejectUploads()). - _("Deleted files by the cleaner: ", metricsInfo.getTotalDeletedFiles()). - _("Processed files by the cleaner: ", metricsInfo.getTotalProcessedFiles()); - html._(InfoBlock.class); + __("Started on:", Times.format(scm.getStartTime())). + __("Cache hits: ", metricsInfo.getCacheHits()). + __("Cache misses: ", metricsInfo.getCacheMisses()). + __("Cache releases: ", metricsInfo.getCacheReleases()). + __("Accepted uploads: ", metricsInfo.getAcceptedUploads()). + __("Rejected uploads: ", metricsInfo.getRejectUploads()). + __("Deleted files by the cleaner: ", metricsInfo.getTotalDeletedFiles()). + __("Processed files by the cleaner: ", metricsInfo.getTotalProcessedFiles()); + html.__(InfoBlock.class); } } } http://git-wip-us.apache.org/repos/asf/hadoop/blob/38c6fa5c/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/ProxyUtils.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/ProxyUtils.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/ProxyUtils.java index 7d61f74..4886c55 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/ProxyUtils.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/ProxyUtils.java @@ -19,7 +19,7 @@ package org.apache.hadoop.yarn.server.webproxy; import org.apache.hadoop.yarn.webapp.MimeType; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -41,7 +41,7 @@ public class ProxyUtils { "This filter only works for HTTP/HTTPS"; public static final String LOCATION = "Location"; - public static class _ implements Hamlet._ { + public static class __ implements Hamlet.__ { //Empty } @@ -50,7 +50,7 @@ public class ProxyUtils { super(out, 0, false); } - public HTML<ProxyUtils._> html() { + public HTML<ProxyUtils.__> html() { return new HTML<>("html", null, EnumSet.of(EOpt.ENDTAG)); } } @@ -86,13 +86,13 @@ public class ProxyUtils { PrintWriter writer = response.getWriter(); Page p = new Page(writer); p.html() - .head().title("Moved")._() + .head().title("Moved").__() .body() .h1("Moved") .div() - ._("Content has moved ") - .a(location, "here")._() - ._()._(); + .__("Content has moved ") + .a(location, "here").__() + .__().__(); writer.close(); } @@ -110,7 +110,7 @@ public class ProxyUtils { Page p = new Page(resp.getWriter()); p.html(). h1(message). - _(); + __(); } /** http://git-wip-us.apache.org/repos/asf/hadoop/blob/38c6fa5c/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java ---------------------------------------------------------------------- diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java index b32ee30..e1588c1 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-web-proxy/src/main/java/org/apache/hadoop/yarn/server/webproxy/WebAppProxyServlet.java @@ -58,7 +58,7 @@ import org.apache.hadoop.yarn.util.Apps; import org.apache.hadoop.yarn.util.StringHelper; import org.apache.hadoop.yarn.util.TrackingUriPlugin; import org.apache.hadoop.yarn.webapp.MimeType; -import org.apache.hadoop.yarn.webapp.hamlet.Hamlet; +import org.apache.hadoop.yarn.webapp.hamlet2.Hamlet; import org.apache.hadoop.yarn.webapp.util.WebAppUtils; import org.apache.http.Header; import org.apache.http.HttpResponse; @@ -108,7 +108,7 @@ public class WebAppProxyServlet extends HttpServlet { /** * Empty Hamlet class. */ - private static class _ implements Hamlet._ { + private static class __ implements Hamlet.__ { //Empty } @@ -117,7 +117,7 @@ public class WebAppProxyServlet extends HttpServlet { super(out, 0, false); } - public HTML<WebAppProxyServlet._> html() { + public HTML<WebAppProxyServlet.__> html() { return new HTML<>("html", null, EnumSet.of(EOpt.ENDTAG)); } } @@ -172,10 +172,10 @@ public class WebAppProxyServlet extends HttpServlet { p.html(). h1("WARNING: The following page may not be safe!"). h3(). - _("click ").a(link, "here"). - _(" to continue to an Application Master web interface owned by ", user). - _(). - _(); + __("click ").a(link, "here"). + __(" to continue to an Application Master web interface owned by ", user). + __(). + __(); } /** --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org