MAPREDUCE-3913. RM application webpage is unresponsive after 2000 jobs (Jason Lowe via tgraves)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1294207 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thomas Graves 2012-02-27 16:44:05 +00:00
parent f071323343
commit d6170f00b1
3 changed files with 11 additions and 7 deletions

View File

@ -178,6 +178,9 @@ Release 0.23.2 - UNRELEASED
MAPREDUCE-3686. Fixed two bugs in Counters because of which web app displays
zero counter values for framework counters. (Bhallamudi Venkata Siva Kamesh
via vinodkv)
MAPREDUCE-3913. RM application webpage is unresponsive after 2000 jobs
(Jason Lowe via tgraves)
Release 0.23.1 - 2012-02-17

View File

@ -30,7 +30,6 @@
public class RmView extends TwoColumnLayout {
static final int MAX_DISPLAY_ROWS = 100; // direct table rendering
static final int MAX_FAST_ROWS = 1000; // inline js array
static final int MAX_INLINE_ROWS = 2000; // ajax load
@Override
protected void preHead(Page.HTML<_> html) {
@ -81,11 +80,6 @@ private String appsTableInit() {
if (list.apps.size() > MAX_FAST_ROWS) {
tableInitProgress(init, list.apps.size() * 6);
}
if (list.apps.size() > MAX_INLINE_ROWS) {
list.rendering = Render.JS_LOAD;
return init.append(", sAjaxSource:'").append(url("apps", "json")).
append("'}").toString();
}
list.rendering = Render.JS_ARRAY;
return init.append(", aaData:appsData}").toString();
}

View File

@ -177,8 +177,10 @@ public static ResourceManager mockRm(int apps, int racks, int nodes,
public static ResourceManager mockRm(RMContext rmContext) throws IOException {
ResourceManager rm = mock(ResourceManager.class);
ResourceScheduler rs = mockCapacityScheduler();
ApplicationACLsManager aclMgr = mockAppACLsManager();
when(rm.getResourceScheduler()).thenReturn(rs);
when(rm.getRMContext()).thenReturn(rmContext);
when(rm.getApplicationACLsManager()).thenReturn(aclMgr);
return rm;
}
@ -192,6 +194,11 @@ public static CapacityScheduler mockCapacityScheduler() throws IOException {
return cs;
}
public static ApplicationACLsManager mockAppACLsManager() {
Configuration conf = new Configuration();
return new ApplicationACLsManager(conf);
}
static void setupQueueConfiguration(CapacitySchedulerConfiguration conf) {
// Define top-level queues
conf.setQueues(CapacitySchedulerConfiguration.ROOT, new String[] {"a", "b", "c"});
@ -271,7 +278,7 @@ static void setupFifoQueueConfiguration(CapacitySchedulerConfiguration conf) {
public static void main(String[] args) throws Exception {
// For manual testing
WebApps.$for("yarn", new TestRMWebApp()).at(8888).inDevMode().
start(new RMWebApp(mockRm(101, 8, 8, 8*GiB))).joinThread();
start(new RMWebApp(mockRm(2500, 8, 8, 8*GiB))).joinThread();
WebApps.$for("yarn", new TestRMWebApp()).at(8888).inDevMode().
start(new RMWebApp(mockFifoRm(10, 1, 4, 8*GiB))).joinThread();
}