Revert "YARN-3840. Resource Manager web ui issue when sorting application by id (with application having id > 9999) Contributed by Mohammad Shahid Khan"
This reverts commit 8fbea531d7
.
Conflicts:
hadoop-yarn-project/CHANGES.txt
This commit is contained in:
parent
621cbb4f69
commit
fcd7888029
@ -221,7 +221,7 @@ private String attemptsTableInit() {
|
|||||||
.append("\n{'aTargets': [ 5 ]")
|
.append("\n{'aTargets': [ 5 ]")
|
||||||
.append(", 'bSearchable': false }")
|
.append(", 'bSearchable': false }")
|
||||||
|
|
||||||
.append("\n, {'sType':'natural', 'aTargets': [ 0 ]")
|
.append("\n, {'sType':'string', 'aTargets': [ 0 ]")
|
||||||
.append(", 'mRender': parseHadoopID }")
|
.append(", 'mRender': parseHadoopID }")
|
||||||
|
|
||||||
.append("\n, {'sType':'numeric', 'aTargets': [ 6, 7")
|
.append("\n, {'sType':'numeric', 'aTargets': [ 6, 7")
|
||||||
|
@ -43,7 +43,7 @@ private String tasksTableInit() {
|
|||||||
.append(", bProcessing: true")
|
.append(", bProcessing: true")
|
||||||
|
|
||||||
.append("\n, aoColumnDefs: [\n")
|
.append("\n, aoColumnDefs: [\n")
|
||||||
.append("{'sType':'natural', 'aTargets': [0]")
|
.append("{'sType':'string', 'aTargets': [0]")
|
||||||
.append(", 'mRender': parseHadoopID }")
|
.append(", 'mRender': parseHadoopID }")
|
||||||
|
|
||||||
.append("\n, {'sType':'numeric', bSearchable:false, 'aTargets': [1]")
|
.append("\n, {'sType':'numeric', bSearchable:false, 'aTargets': [1]")
|
||||||
|
@ -1050,9 +1050,6 @@ Release 2.8.0 - UNRELEASED
|
|||||||
YARN-4326. Fix TestDistributedShell timeout as AHS in MiniYarnCluster no longer
|
YARN-4326. Fix TestDistributedShell timeout as AHS in MiniYarnCluster no longer
|
||||||
binds to default port 8188. (Meng Ding via wangda)
|
binds to default port 8188. (Meng Ding via wangda)
|
||||||
|
|
||||||
YARN-3840. Resource Manager web ui issue when sorting application by id (with
|
|
||||||
application having id > 9999) (Mohammad Shahid Khan via jianhe)
|
|
||||||
|
|
||||||
YARN-4345. yarn rmadmin -updateNodeResource doesn't work (Junping Du via
|
YARN-4345. yarn rmadmin -updateNodeResource doesn't work (Junping Du via
|
||||||
jlowe)
|
jlowe)
|
||||||
|
|
||||||
|
@ -65,14 +65,14 @@ public class JQueryUI extends HtmlBlock {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void render(Block html) {
|
protected void render(Block html) {
|
||||||
html.link(root_url("static/jquery/themes-1.9.1/base/jquery-ui.css"))
|
html.
|
||||||
.link(root_url("static/dt-1.9.4/css/jui-dt.css"))
|
link(root_url("static/jquery/themes-1.9.1/base/jquery-ui.css")).
|
||||||
.script(root_url("static/jquery/jquery-1.8.2.min.js"))
|
link(root_url("static/dt-1.9.4/css/jui-dt.css")).
|
||||||
.script(root_url("static/jquery/jquery-ui-1.9.1.custom.min.js"))
|
script(root_url("static/jquery/jquery-1.8.2.min.js")).
|
||||||
.script(root_url("static/dt-1.9.4/js/jquery.dataTables.min.js"))
|
script(root_url("static/jquery/jquery-ui-1.9.1.custom.min.js")).
|
||||||
.script(root_url("static/yarn.dt.plugins.js"))
|
script(root_url("static/dt-1.9.4/js/jquery.dataTables.min.js")).
|
||||||
.script(root_url("static/dt-plugin-1.10.7/sorting/natural.js"))
|
script(root_url("static/yarn.dt.plugins.js")).
|
||||||
.style("#jsnotice { padding: 0.2em; text-align: center; }",
|
style("#jsnotice { padding: 0.2em; text-align: center; }",
|
||||||
".ui-progressbar { height: 1em; min-width: 5em }"); // required
|
".ui-progressbar { height: 1em; min-width: 5em }"); // required
|
||||||
|
|
||||||
List<String> list = Lists.newArrayList();
|
List<String> list = Lists.newArrayList();
|
||||||
@ -82,8 +82,9 @@ protected void render(Block html) {
|
|||||||
initProgressBars(list);
|
initProgressBars(list);
|
||||||
|
|
||||||
if (!list.isEmpty()) {
|
if (!list.isEmpty()) {
|
||||||
html.script().$type("text/javascript")._("$(function() {")
|
html.
|
||||||
._(list.toArray())._("});")._();
|
script().$type("text/javascript").
|
||||||
|
_("$(function() {")._(list.toArray())._("});")._();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
@ -53,7 +53,7 @@ protected Class<? extends SubView> content() {
|
|||||||
|
|
||||||
protected String getContainersTableColumnDefs() {
|
protected String getContainersTableColumnDefs() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
return sb.append("[\n").append("{'sType':'natural', 'aTargets': [0]")
|
return sb.append("[\n").append("{'sType':'string', 'aTargets': [0]")
|
||||||
.append(", 'mRender': parseHadoopID }]").toString();
|
.append(", 'mRender': parseHadoopID }]").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ protected Class<? extends SubView> content() {
|
|||||||
|
|
||||||
protected String getAttemptsTableColumnDefs() {
|
protected String getAttemptsTableColumnDefs() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
return sb.append("[\n").append("{'sType':'natural', 'aTargets': [0]")
|
return sb.append("[\n").append("{'sType':'string', 'aTargets': [0]")
|
||||||
.append(", 'mRender': parseHadoopID }")
|
.append(", 'mRender': parseHadoopID }")
|
||||||
|
|
||||||
.append("\n, {'sType':'numeric', 'aTargets': [1]")
|
.append("\n, {'sType':'numeric', 'aTargets': [1]")
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
import static org.apache.hadoop.yarn.webapp.Params.TITLE;
|
import static org.apache.hadoop.yarn.webapp.Params.TITLE;
|
||||||
import static org.mockito.Mockito.mock;
|
import static org.mockito.Mockito.mock;
|
||||||
|
|
||||||
import java.util.Map;
|
import org.junit.Assert;
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.yarn.api.ApplicationBaseProtocol;
|
import org.apache.hadoop.yarn.api.ApplicationBaseProtocol;
|
||||||
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
import org.apache.hadoop.yarn.api.records.ApplicationAttemptId;
|
||||||
@ -38,7 +38,6 @@
|
|||||||
import org.apache.hadoop.yarn.util.StringHelper;
|
import org.apache.hadoop.yarn.util.StringHelper;
|
||||||
import org.apache.hadoop.yarn.webapp.YarnWebParams;
|
import org.apache.hadoop.yarn.webapp.YarnWebParams;
|
||||||
import org.apache.hadoop.yarn.webapp.test.WebAppTests;
|
import org.apache.hadoop.yarn.webapp.test.WebAppTests;
|
||||||
import org.junit.Assert;
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
@ -88,21 +87,6 @@ public void testView() throws Exception {
|
|||||||
WebAppTests.flushOutput(injector);
|
WebAppTests.flushOutput(injector);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testAPPViewNaturalSortType() throws Exception {
|
|
||||||
Injector injector =
|
|
||||||
WebAppTests.createMockInjector(ApplicationBaseProtocol.class,
|
|
||||||
mockApplicationHistoryClientService(5, 1, 1));
|
|
||||||
AHSView ahsViewInstance = injector.getInstance(AHSView.class);
|
|
||||||
|
|
||||||
ahsViewInstance.render();
|
|
||||||
WebAppTests.flushOutput(injector);
|
|
||||||
Map<String, String> moreParams =
|
|
||||||
ahsViewInstance.context().requestContext().moreParams();
|
|
||||||
String appTableColumnsMeta = moreParams.get("ui.dataTables.apps.init");
|
|
||||||
Assert.assertTrue(appTableColumnsMeta.indexOf("natural") != -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAboutPage() throws Exception {
|
public void testAboutPage() throws Exception {
|
||||||
Injector injector =
|
Injector injector =
|
||||||
@ -133,22 +117,6 @@ public void testAppPage() throws Exception {
|
|||||||
WebAppTests.flushOutput(injector);
|
WebAppTests.flushOutput(injector);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testAppPageNaturalSortType() throws Exception {
|
|
||||||
Injector injector =
|
|
||||||
WebAppTests.createMockInjector(ApplicationBaseProtocol.class,
|
|
||||||
mockApplicationHistoryClientService(1, 5, 1));
|
|
||||||
AppPage appPageInstance = injector.getInstance(AppPage.class);
|
|
||||||
|
|
||||||
appPageInstance.render();
|
|
||||||
WebAppTests.flushOutput(injector);
|
|
||||||
Map<String, String> moreParams =
|
|
||||||
appPageInstance.context().requestContext().moreParams();
|
|
||||||
String attemptsTableColumnsMeta =
|
|
||||||
moreParams.get("ui.dataTables.attempts.init");
|
|
||||||
Assert.assertTrue(attemptsTableColumnsMeta.indexOf("natural") != -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAppAttemptPage() throws Exception {
|
public void testAppAttemptPage() throws Exception {
|
||||||
Injector injector =
|
Injector injector =
|
||||||
@ -167,21 +135,6 @@ public void testAppAttemptPage() throws Exception {
|
|||||||
WebAppTests.flushOutput(injector);
|
WebAppTests.flushOutput(injector);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testAppAttemptPageNaturalSortType() throws Exception {
|
|
||||||
Injector injector =
|
|
||||||
WebAppTests.createMockInjector(ApplicationBaseProtocol.class,
|
|
||||||
mockApplicationHistoryClientService(1, 1, 5));
|
|
||||||
AppAttemptPage appAttemptPageInstance =
|
|
||||||
injector.getInstance(AppAttemptPage.class);
|
|
||||||
appAttemptPageInstance.render();
|
|
||||||
WebAppTests.flushOutput(injector);
|
|
||||||
Map<String, String> moreParams =
|
|
||||||
appAttemptPageInstance.context().requestContext().moreParams();
|
|
||||||
String tableColumnsMeta = moreParams.get("ui.dataTables.containers.init");
|
|
||||||
Assert.assertTrue(tableColumnsMeta.indexOf("natural") != -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testContainerPage() throws Exception {
|
public void testContainerPage() throws Exception {
|
||||||
Injector injector =
|
Injector injector =
|
||||||
@ -242,4 +195,5 @@ protected ApplicationHistoryStore createApplicationHistoryStore(
|
|||||||
return store;
|
return store;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ private static String getAppsTableColumnDefs(
|
|||||||
boolean isFairSchedulerPage, boolean isResourceManager) {
|
boolean isFairSchedulerPage, boolean isResourceManager) {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append("[\n")
|
sb.append("[\n")
|
||||||
.append("{'sType':'natural', 'aTargets': [0]")
|
.append("{'sType':'string', 'aTargets': [0]")
|
||||||
.append(", 'mRender': parseHadoopID }")
|
.append(", 'mRender': parseHadoopID }")
|
||||||
.append("\n, {'sType':'numeric', 'aTargets': [6, 7]")
|
.append("\n, {'sType':'numeric', 'aTargets': [6, 7]")
|
||||||
.append(", 'mRender': renderHadoopDate }")
|
.append(", 'mRender': renderHadoopDate }")
|
||||||
@ -75,7 +75,7 @@ public static String attemptsTableInit() {
|
|||||||
|
|
||||||
private static String getAttemptsTableColumnDefs() {
|
private static String getAttemptsTableColumnDefs() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
return sb.append("[\n").append("{'sType':'natural', 'aTargets': [0]")
|
return sb.append("[\n").append("{'sType':'string', 'aTargets': [0]")
|
||||||
.append(", 'mRender': parseHadoopID }")
|
.append(", 'mRender': parseHadoopID }")
|
||||||
.append("\n, {'sType':'numeric', 'aTargets': [1]")
|
.append("\n, {'sType':'numeric', 'aTargets': [1]")
|
||||||
.append(", 'mRender': renderHadoopDate }]").toString();
|
.append(", 'mRender': renderHadoopDate }]").toString();
|
||||||
@ -91,7 +91,7 @@ public static String containersTableInit() {
|
|||||||
|
|
||||||
private static String getContainersTableColumnDefs() {
|
private static String getContainersTableColumnDefs() {
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
return sb.append("[\n").append("{'sType':'natural', 'aTargets': [0]")
|
return sb.append("[\n").append("{'sType':'string', 'aTargets': [0]")
|
||||||
.append(", 'mRender': parseHadoopID }]").toString();
|
.append(", 'mRender': parseHadoopID }]").toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,14 +54,7 @@ private String appsTableInit() {
|
|||||||
// Sort by id upon page load
|
// Sort by id upon page load
|
||||||
append(", aaSorting: [[0, 'asc']]").
|
append(", aaSorting: [[0, 'asc']]").
|
||||||
// applicationid, applicationstate
|
// applicationid, applicationstate
|
||||||
append(", aoColumns:[").append(getApplicationsIdColumnDefs())
|
append(", aoColumns:[null, null]} ").toString();
|
||||||
.append(", null]} ").toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getApplicationsIdColumnDefs() {
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
return sb.append("{'sType':'natural', 'aTargets': [0]")
|
|
||||||
.append(", 'mRender': parseHadoopID }").toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -52,15 +52,9 @@ public class AllContainersPage extends NMView {
|
|||||||
private String containersTableInit() {
|
private String containersTableInit() {
|
||||||
return tableInit().
|
return tableInit().
|
||||||
// containerid, containerid, log-url
|
// containerid, containerid, log-url
|
||||||
append(", aoColumns:[").append(getContainersIdColumnDefs())
|
append(", aoColumns:[null, null, {bSearchable:false}]} ").toString();
|
||||||
.append(", null, {bSearchable:false}]} ").toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getContainersIdColumnDefs() {
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
return sb.append("{'sType':'natural', 'aTargets': [0]")
|
|
||||||
.append(", 'mRender': parseHadoopID }").toString();
|
|
||||||
}
|
|
||||||
@Override
|
@Override
|
||||||
protected Class<? extends SubView> content() {
|
protected Class<? extends SubView> content() {
|
||||||
return AllContainersBlock.class;
|
return AllContainersBlock.class;
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.ConcurrentMap;
|
import java.util.concurrent.ConcurrentMap;
|
||||||
|
|
||||||
import org.apache.hadoop.conf.Configuration;
|
import org.apache.hadoop.conf.Configuration;
|
||||||
@ -120,10 +119,6 @@ public void configure(Binder binder) {
|
|||||||
YarnApplicationState.RUNNING.toString()));
|
YarnApplicationState.RUNNING.toString()));
|
||||||
rmViewInstance.render();
|
rmViewInstance.render();
|
||||||
WebAppTests.flushOutput(injector);
|
WebAppTests.flushOutput(injector);
|
||||||
Map<String, String> moreParams =
|
|
||||||
rmViewInstance.context().requestContext().moreParams();
|
|
||||||
String appsTableColumnsMeta = moreParams.get("ui.dataTables.apps.init");
|
|
||||||
Assert.assertTrue(appsTableColumnsMeta.indexOf("natural") != -1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test public void testNodesPage() {
|
@Test public void testNodesPage() {
|
||||||
|
Loading…
Reference in New Issue
Block a user