hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r1137014 - in /hadoop/common/branches/MR-279/mapreduce: ./ mr-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/ mr-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app...
Date Fri, 17 Jun 2011 20:42:29 GMT
Author: llu
Date: Fri Jun 17 20:42:28 2011
New Revision: 1137014

URL: http://svn.apache.org/viewvc?rev=1137014&view=rev
Log:
Fix RM app start/finish time and diagnostics. (llu)

Added:
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/MockAsm.java
Modified:
    hadoop/common/branches/MR-279/mapreduce/CHANGES.txt
    hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AppController.java
    hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/MockJobs.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/Controller.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/View.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/TwoColumnLayout.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/test/java/org/apache/hadoop/yarn/MockApps.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/AMTracker.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/AppContext.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationMasterInfo.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationsManager.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationsManagerImpl.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/SchedulerNegotiator.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppsBlock.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppsList.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodesPage.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmController.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmView.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/TestAMRestart.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/TestASMStateMachine.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebApp.java

Modified: hadoop/common/branches/MR-279/mapreduce/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/CHANGES.txt?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/CHANGES.txt (original)
+++ hadoop/common/branches/MR-279/mapreduce/CHANGES.txt Fri Jun 17 20:42:28 2011
@@ -4,6 +4,9 @@ Trunk (unreleased changes)
 
 
     MAPREDUCE-279
+
+    Fix RM app start/finish time and diagnostics. (llu)
+
     Fix race condition between multiple localizers on a single node. (cdouglas via mahadev)
 
     Improve logging for AM when requesting containers to show the right ask 

Modified: hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AppController.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AppController.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AppController.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/AppController.java Fri Jun 17 20:42:28 2011
@@ -23,8 +23,6 @@ import static org.apache.hadoop.yarn.uti
 import java.util.Locale;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.mapreduce.v2.api.records.JobId;
 import org.apache.hadoop.mapreduce.v2.api.records.TaskId;
@@ -37,7 +35,6 @@ import org.apache.hadoop.yarn.webapp.Con
 import com.google.inject.Inject;
 
 public class AppController extends Controller implements AMParams {
-  private static final Log LOG = LogFactory.getLog(AppController.class);
   final App app;
   
   protected AppController(App app, Configuration conf, RequestContext ctx,
@@ -63,7 +60,8 @@ public class AppController extends Contr
       _("Application Name:", app.context.getApplicationName()).
       _("User:", app.context.getUser()).
       _("Started on:", Times.format(app.context.getStartTime())).
-      _("Elasped: ", Times.elapsed(app.context.getStartTime(), 0));
+      _("Elasped: ", org.apache.hadoop.util.StringUtils.formatTime(
+        Times.elapsed(app.context.getStartTime(), 0)));
     render(InfoPage.class);
   }
 

Modified: hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/MockJobs.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/MockJobs.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/MockJobs.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/MockJobs.java Fri Jun 17 20:42:28 2011
@@ -51,9 +51,7 @@ import org.apache.hadoop.security.UserGr
 import org.apache.hadoop.yarn.MockApps;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
 import org.apache.hadoop.yarn.api.records.ContainerId;
-import org.apache.hadoop.yarn.factories.RecordFactory;
-import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider;
-
+import org.apache.hadoop.yarn.util.Records;
 
 public class MockJobs extends MockApps {
   static final Iterator<JobState> JOB_STATES = Iterators.cycle(
@@ -81,7 +79,8 @@ public class MockJobs extends MockApps {
   static final Iterator<String> DIAGS = Iterators.cycle(
       "Error: java.lang.OutOfMemoryError: Java heap space",
       "Lost task tracker: tasktracker.domain/127.0.0.1:40879");
-  static final RecordFactory recordFactory = RecordFactoryProvider.getRecordFactory(null);
+
+  static final int DT = 1000000; // ms
 
   public static String newJobName() {
     return newAppName();
@@ -99,17 +98,17 @@ public class MockJobs extends MockApps {
   }
 
   public static JobId newJobID(ApplicationId appID, int i) {
-    JobId id = recordFactory.newRecordInstance(JobId.class);
+    JobId id = Records.newRecord(JobId.class);
     id.setAppId(appID);
     id.setId(i);
     return id;
   }
 
   public static JobReport newJobReport(JobId id) {
-    JobReport report = recordFactory.newRecordInstance(JobReport.class);
+    JobReport report = Records.newRecord(JobReport.class);
     report.setJobId(id);
-    report.setStartTime(System.currentTimeMillis() - (int)(Math.random() * 1000000));
-    report.setFinishTime(System.currentTimeMillis() + (int)(Math.random() * 1000000) + 1);
+    report.setStartTime(System.currentTimeMillis() - (int)(Math.random() * DT));
+    report.setFinishTime(System.currentTimeMillis() + (int)(Math.random() * DT) + 1);
     report.setMapProgress((float)Math.random());
     report.setReduceProgress((float)Math.random());
     report.setJobState(JOB_STATES.next());
@@ -117,10 +116,10 @@ public class MockJobs extends MockApps {
   }
 
   public static TaskReport newTaskReport(TaskId id) {
-    TaskReport report = recordFactory.newRecordInstance(TaskReport.class);
+    TaskReport report = Records.newRecord(TaskReport.class);
     report.setTaskId(id);
-    report.setStartTime(System.currentTimeMillis() - (int)(Math.random() * 1000000));
-    report.setFinishTime(System.currentTimeMillis() + (int)(Math.random() * 1000000) + 1);
+    report.setStartTime(System.currentTimeMillis() - (int)(Math.random() * DT));
+    report.setFinishTime(System.currentTimeMillis() + (int)(Math.random() * DT) + 1);
     report.setProgress((float)Math.random());
     report.setCounters(newCounters());
     report.setTaskState(TASK_STATES.next());
@@ -128,10 +127,10 @@ public class MockJobs extends MockApps {
   }
 
   public static TaskAttemptReport newTaskAttemptReport(TaskAttemptId id) {
-    TaskAttemptReport report = recordFactory.newRecordInstance(TaskAttemptReport.class);
+    TaskAttemptReport report = Records.newRecord(TaskAttemptReport.class);
     report.setTaskAttemptId(id);
-    report.setStartTime(System.currentTimeMillis() - (int)(Math.random() * 1000000));
-    report.setFinishTime(System.currentTimeMillis() + (int)(Math.random() * 1000000) + 1);
+    report.setStartTime(System.currentTimeMillis() - (int)(Math.random() * DT));
+    report.setFinishTime(System.currentTimeMillis() + (int)(Math.random() * DT) + 1);
     report.setPhase(PHASES.next());
     report.setTaskAttemptState(TASK_ATTEMPT_STATES.next());
     report.setProgress((float)Math.random());
@@ -153,7 +152,7 @@ public class MockJobs extends MockApps {
     for (int i = 0; i < nc; ++i) {
       for (FileSystemCounter c : FileSystemCounter.values()) {
         hc.findCounter(FS_SCHEMES.next(), c).
-            setValue((long)(Math.random() * 1000000));
+            setValue((long)(Math.random() * DT));
       }
     }
     for (int i = 0; i < 2 * 3; ++i) {
@@ -174,7 +173,7 @@ public class MockJobs extends MockApps {
   }
 
   public static TaskAttempt newTaskAttempt(TaskId tid, int i) {
-    final TaskAttemptId taid = recordFactory.newRecordInstance(TaskAttemptId.class);
+    final TaskAttemptId taid = Records.newRecord(TaskAttemptId.class);
     taid.setTaskId(tid);
     taid.setId(i);
     final TaskAttemptReport report = newTaskAttemptReport(taid);
@@ -228,7 +227,7 @@ public class MockJobs extends MockApps {
 
       @Override
       public ContainerId getAssignedContainerID() {
-        ContainerId id = recordFactory.newRecordInstance(ContainerId.class);
+        ContainerId id = Records.newRecord(ContainerId.class);
         id.setAppId(taid.getTaskId().getJobId().getAppId());
         return id;
       }
@@ -260,7 +259,7 @@ public class MockJobs extends MockApps {
   }
 
   public static Task newTask(JobId jid, int i, int m) {
-    final TaskId tid = recordFactory.newRecordInstance(TaskId.class);
+    final TaskId tid = Records.newRecord(TaskId.class);
     tid.setJobId(jid);
     tid.setId(i);
     tid.setTaskType(TASK_TYPES.next());

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/Controller.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/Controller.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/Controller.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/Controller.java Fri Jun 17 20:42:28 2011
@@ -146,6 +146,10 @@ public abstract class Controller impleme
 
   public Injector injector() { return context().injector; }
 
+  public <T> T getInstance(Class<T> cls) {
+    return injector.getInstance(cls);
+  }
+
   public HttpServletRequest request() { return context().request; }
 
   public HttpServletResponse response() { return context().response; }
@@ -172,7 +176,7 @@ public abstract class Controller impleme
   }
 
   public ResponseInfo info(String about) {
-    return injector().getInstance(ResponseInfo.class).about(about);
+    return getInstance(ResponseInfo.class).about(about);
   }
 
   /**
@@ -203,7 +207,7 @@ public abstract class Controller impleme
 
   protected void render(Class<? extends View> cls) {
     context().rendered = true;
-    injector().getInstance(cls).render();
+    getInstance(cls).render();
   }
 
   /**
@@ -224,7 +228,7 @@ public abstract class Controller impleme
   protected void renderJSON(Class<? extends ToJSON> cls) {
     context().rendered = true;
     response().setContentType(MimeType.JSON);
-    injector().getInstance(cls).toJSON(writer());
+    getInstance(cls).toJSON(writer());
   }
 
   /**

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/View.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/View.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/View.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/View.java Fri Jun 17 20:42:28 2011
@@ -101,6 +101,10 @@ public abstract class View implements Pa
 
   public Injector injector() { return context().rc.injector; }
 
+  public <T> T getInstance(Class<T> cls) {
+    return injector().getInstance(cls);
+  }
+
   public HttpServletRequest request() {
     return context().rc.request;
   }
@@ -194,7 +198,7 @@ public abstract class View implements Pa
   }
 
   public ResponseInfo info(String about) {
-    return injector().getInstance(ResponseInfo.class).about(about);
+    return getInstance(ResponseInfo.class).about(about);
   }
 
   /**
@@ -203,7 +207,7 @@ public abstract class View implements Pa
    */
   public void render(Class<? extends SubView> cls) {
     int saved = context().nestLevel;
-    injector().getInstance(cls).renderPartial();
+    getInstance(cls).renderPartial();
     if (context().nestLevel != saved) {
       throw new WebAppException("View "+ cls.getSimpleName() +" not complete");
     }

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/TwoColumnLayout.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/TwoColumnLayout.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/TwoColumnLayout.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/webapp/view/TwoColumnLayout.java Fri Jun 17 20:42:28 2011
@@ -91,7 +91,6 @@ public class TwoColumnLayout extends Htm
                                 String... innerStyles) {
     List<String> styles = Lists.newArrayList();
     styles.add(join('#', tableId, "_paginate span {font-weight:normal}"));
-    styles.add(join('#', tableId, " .id {width:14em}"));
     styles.add(join('#', tableId, " .progress {width:8em}"));
     styles.add(join('#', tableId, "_processing {top:-1.5em; font-size:1em;"));
     styles.add("  color:#000; background:rgba(255, 255, 255, 0.8)}");

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/test/java/org/apache/hadoop/yarn/MockApps.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/test/java/org/apache/hadoop/yarn/MockApps.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/test/java/org/apache/hadoop/yarn/MockApps.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/test/java/org/apache/hadoop/yarn/MockApps.java Fri Jun 17 20:42:28 2011
@@ -29,7 +29,7 @@ import org.apache.hadoop.yarn.api.record
 import org.apache.hadoop.yarn.api.records.ApplicationState;
 import org.apache.hadoop.yarn.api.records.ApplicationStatus;
 import org.apache.hadoop.yarn.api.records.Container;
-import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider;
+import org.apache.hadoop.yarn.util.Records;
 
 /**
  * Utilities to generate fake test apps
@@ -146,14 +146,14 @@ public class MockApps {
   }
 
   public static ApplicationId newAppID(int i) {
-    ApplicationId id = RecordFactoryProvider.getRecordFactory(null).newRecordInstance(ApplicationId.class);
+    ApplicationId id = Records.newRecord(ApplicationId.class);
     id.setClusterTimestamp(TS);
     id.setId(i);
     return id;
   }
 
   public static ApplicationStatus newAppStatus() {
-    ApplicationStatus status = RecordFactoryProvider.getRecordFactory(null).newRecordInstance(ApplicationStatus.class);
+    ApplicationStatus status = Records.newRecord(ApplicationStatus.class);
     status.setProgress((float)Math.random());
     status.setLastSeen(System.currentTimeMillis());
     return status;

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/AMTracker.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/AMTracker.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/AMTracker.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/AMTracker.java Fri Jun 17 20:42:28 2011
@@ -354,10 +354,7 @@ public class AMTracker extends AbstractS
     public String getUser() {   
       throw notimplemented;
     }
-    @Override
-    public long getLastSeen() {
-      return master.getStatus().getLastSeen();
-    }
+   
     @Override
     public String getName() {
       throw notimplemented;
@@ -376,6 +373,16 @@ public class AMTracker extends AbstractS
     public ApplicationStore getStore() {
      throw notimplemented;
     }
+
+    @Override
+    public long getStartTime() {
+      throw notimplemented;
+    }
+
+    @Override
+    public long getFinishTime() {
+      throw notimplemented;
+    }
   }
 
   public void heartBeat(ApplicationStatus status) {

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/AppContext.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/AppContext.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/AppContext.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/AppContext.java Fri Jun 17 20:42:28 2011
@@ -76,12 +76,6 @@ public interface AppContext {
   public String getUser();
   
   /**
-   * The last time the RM heard from this application
-   * @return the last time RM heard from this application.
-   */
-  public long getLastSeen();  
-  
-  /**
    * the name for this application
    * @return the application name.
    */
@@ -104,4 +98,16 @@ public interface AppContext {
    * @return the application store for this application
    */
   public ApplicationStore getStore();
+  
+  /**
+   * the start time of the application
+   * @return the start time of the application
+   */
+  public long getStartTime();
+  
+  /**
+   * The finish time of the application
+   * @return the finish time of the application
+   */
+  public long getFinishTime();
 }
\ No newline at end of file

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationMasterInfo.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationMasterInfo.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationMasterInfo.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationMasterInfo.java Fri Jun 17 20:42:28 2011
@@ -68,6 +68,13 @@ public class ApplicationMasterInfo imple
   private final EventHandler syncHandler;
   private Container masterContainer;
   final private String user;
+  private long startTime = 0;
+  private long finishTime = 0;
+  private String diagnostic;
+  private static String DIAGNOSTIC_KILL_APPLICATION = "Application was killed.";
+  private static String DIAGNOSTIC_AM_FAILED = "Application Master failed";
+  private static String DIAGNOSTIC_AM_LAUNCH_FAILED = "Application Master failed to launch";
+  
   private int numFailed = 0;
   private final ApplicationStore appStore;
   
@@ -218,7 +225,9 @@ public class ApplicationMasterInfo imple
     stateMachine = stateMachineFactory.make(this);
     master.setState(ApplicationState.PENDING);
     master.setClientToken(clientToken);
+    master.setDiagnostics("");
     this.appStore = appStore;
+    this.startTime = System.currentTimeMillis();
   }
 
   @Override
@@ -254,7 +263,17 @@ public class ApplicationMasterInfo imple
   public synchronized ApplicationState getState() {
     return master.getState();
   }
-
+  
+  @Override
+  public synchronized long getStartTime() {
+    return this.startTime;
+  }
+  
+  @Override
+  public synchronized long getFinishTime() {
+    return this.finishTime;
+  }
+  
   @Override
   public synchronized Container getMasterContainer() {
     return masterContainer;
@@ -266,10 +285,6 @@ public class ApplicationMasterInfo imple
     return this.user;
   }
 
-  @Override
-  public synchronized long getLastSeen() {
-    return this.master.getStatus().getLastSeen();
-  }
 
   @Override
   public synchronized int getFailedCount() {
@@ -304,7 +319,7 @@ public class ApplicationMasterInfo imple
         AMLauncherEventType.CLEANUP, masterInfo));
       masterInfo.handler.handle(new ASMEvent<ApplicationTrackerEventType>(
       ApplicationTrackerEventType.REMOVE, masterInfo));
-
+      masterInfo.finishTime = System.currentTimeMillis();
       ApplicationFinishEvent finishEvent = (ApplicationFinishEvent) event;
       return finishEvent.getFinalApplicationState();
     }
@@ -325,6 +340,8 @@ public class ApplicationMasterInfo imple
     @Override
     public void transition(ApplicationMasterInfo masterInfo,
     ASMEvent<ApplicationEventType> event) {
+      masterInfo.finishTime = System.currentTimeMillis();
+      masterInfo.getMaster().setDiagnostics(DIAGNOSTIC_KILL_APPLICATION);
       masterInfo.handler.handle(new ASMEvent<SNEventType>(SNEventType.CLEANUP, masterInfo));
       masterInfo.handler.handle(new ASMEvent<AMLauncherEventType>(AMLauncherEventType.CLEANUP, masterInfo));
       masterInfo.handler.handle(new ASMEvent<ApplicationTrackerEventType>(ApplicationTrackerEventType.REMOVE,
@@ -351,6 +368,8 @@ public class ApplicationMasterInfo imple
     @Override
     public void transition(ApplicationMasterInfo masterInfo,
     ASMEvent<ApplicationEventType> event) {
+      masterInfo.finishTime = System.currentTimeMillis();
+      masterInfo.getMaster().setDiagnostics(DIAGNOSTIC_AM_LAUNCH_FAILED);
       masterInfo.handler.handle(new ASMEvent<SNEventType>(
       SNEventType.RELEASE, masterInfo));
     }

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationsManager.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationsManager.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationsManager.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationsManager.java Fri Jun 17 20:42:28 2011
@@ -56,6 +56,13 @@ public interface ApplicationsManager ext
     * @return {@link Application} information about the application.
     */
    Application getApplication(ApplicationId applicationID);
+
+   /**
+    * Lookup AppContext by application id.
+    * @param appId the application id to lookup
+    * @return the {@link AppContext} of the application
+    */
+   AppContext getAppContext(ApplicationId appId);
    
    /**
     * Submit the application to run on the cluster.
@@ -78,7 +85,7 @@ public interface ApplicationsManager ext
     * This is used by the webUI.
     * @return the applications in the cluster.
     */
-   List<AppContext> getAllApplications();
+   List<AppContext> getAllAppContexts();
    
    /**
     * Get all the applications in the cluster. 

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationsManagerImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationsManagerImpl.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationsManagerImpl.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationsManagerImpl.java Fri Jun 17 20:42:28 2011
@@ -256,7 +256,7 @@ public class ApplicationsManagerImpl ext
  }
 
   @Override
-  public  List<AppContext> getAllApplications() {
+  public  List<AppContext> getAllAppContexts() {
     return amTracker.getAllApplications();
   }
 
@@ -264,9 +264,15 @@ public class ApplicationsManagerImpl ext
       applicationId) {
     return amTracker.get(applicationId);
   }
+
+  @Override
+  public AppContext getAppContext(ApplicationId appId) {
+    return getApplicationMasterInfo(appId);
+  }
   
-  private Application createApplication(ApplicationMaster am, String user,
+  private Application createApplication(AppContext context, String user,
       String queue, String name, Container masterContainer) {
+    ApplicationMaster am = context.getMaster();
     Application application = 
       recordFactory.newRecordInstance(Application.class);
     application.setApplicationId(am.getApplicationId());
@@ -284,8 +290,8 @@ public class ApplicationsManagerImpl ext
   @Override
   public List<Application> getApplications() {
     List<Application> apps = new ArrayList<Application>();
-    for (AppContext am: getAllApplications()) {
-      apps.add(createApplication(am.getMaster(), 
+    for (AppContext am: getAllAppContexts()) {
+      apps.add(createApplication(am, 
           am.getUser(), am.getQueue(), am.getName(), am.getMasterContainer()));
     }
     return apps;
@@ -294,7 +300,7 @@ public class ApplicationsManagerImpl ext
   @Override
   public Application getApplication(ApplicationId appID) {
     ApplicationMasterInfo master = amTracker.get(appID);
-    return (master == null) ? null : createApplication(master.getMaster(),
+    return (master == null) ? null : createApplication(master,
         master.getUser(), master.getQueue(), master.getName(),
         master.getMasterContainer());
   }

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/SchedulerNegotiator.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/SchedulerNegotiator.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/SchedulerNegotiator.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/SchedulerNegotiator.java Fri Jun 17 20:42:28 2011
@@ -296,11 +296,6 @@ class SchedulerNegotiator extends Abstra
     }
 
     @Override
-    public long getLastSeen() {
-      throw notImplementedException;
-    }
-
-    @Override
     public String getName() {
       throw notImplementedException;
     }
@@ -319,5 +314,15 @@ class SchedulerNegotiator extends Abstra
     public ApplicationStore getStore() {
       throw notImplementedException;
     }
+
+    @Override
+    public long getStartTime() {
+      throw notImplementedException;
+    }
+
+    @Override
+    public long getFinishTime() {
+      throw notImplementedException;
+    }
   }
 }
\ No newline at end of file

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppsBlock.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppsBlock.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppsBlock.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppsBlock.java Fri Jun 17 20:42:28 2011
@@ -20,7 +20,7 @@ package org.apache.hadoop.yarn.server.re
 
 import com.google.inject.Inject;
 
-import org.apache.hadoop.yarn.api.records.Application;
+import org.apache.hadoop.yarn.server.resourcemanager.applicationsmanager.AppContext;
 import org.apache.hadoop.yarn.util.Apps;
 import org.apache.hadoop.yarn.webapp.hamlet.Hamlet;
 import org.apache.hadoop.yarn.webapp.hamlet.Hamlet.*;
@@ -48,24 +48,25 @@ class AppsBlock extends HtmlBlock {
             th(".queue", "Queue").
             th(".state", "State").
             th(".progress", "Progress").
-            th(".master", "Master Tracking URL")._()._().
+            th(".ui", "Tracking UI").
+            th(".note", "Note")._()._().
         tbody();
     int i = 0;
-    for (Application app : list.apps) {
-      String appId = Apps.toString(app.getApplicationId());
-      String masterTrackingURL = app.getTrackingUrl();
-      masterTrackingURL =
-          masterTrackingURL == null ? "UNASSIGNED" : masterTrackingURL;
+    for (AppContext app : list.apps) {
+      String appId = Apps.toString(app.getApplicationID());
+      String trackingUrl = app.getMaster().getTrackingUrl();
+      String ui = trackingUrl == null || trackingUrl.isEmpty() ? "UNASSIGNED" :
+          (app.getFinishTime() == 0 ? "ApplicationMaster" : "JobHistory");
       String percent = String.format("%.1f", app.getStatus().getProgress() * 100);
       tbody.
         tr().
           td().
-            br().$title(String.valueOf(app.getApplicationId().getId()))._(). // for sorting
+            br().$title(String.valueOf(app.getApplicationID().getId()))._(). // for sorting
             a(url("app", appId), appId)._().
           td(app.getUser().toString()).
           td(app.getName().toString()).
           td(app.getQueue().toString()).
-          td(app.getState().toString()).
+          td(app.getMaster().getState().toString()).
           td().
             br().$title(percent)._(). // for sorting
             div(_PROGRESSBAR).
@@ -73,8 +74,8 @@ class AppsBlock extends HtmlBlock {
               div(_PROGRESSBAR_VALUE).
                 $style(join("width:", percent, '%'))._()._()._().
           td().
-            a(masterTrackingURL == null ? "#" : join("http://",
-                masterTrackingURL), masterTrackingURL)._()._();
+            a(trackingUrl == null ? "#" : join("http://", trackingUrl), ui)._().
+          td(app.getMaster().getDiagnostics())._();
       if (list.rendering != Render.HTML && ++i >= 20) break;
     }
     tbody._()._();

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppsList.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppsList.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppsList.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppsList.java Fri Jun 17 20:42:28 2011
@@ -25,11 +25,10 @@ import java.io.PrintWriter;
 import java.util.List;
 
 import static org.apache.commons.lang.StringEscapeUtils.*;
-import static org.apache.hadoop.yarn.util.StringHelper.*;
 import static org.apache.hadoop.yarn.webapp.view.JQueryUI.*;
 import static org.apache.hadoop.yarn.webapp.view.Jsons.*;
 
-import org.apache.hadoop.yarn.api.records.Application;
+import org.apache.hadoop.yarn.server.resourcemanager.applicationsmanager.AppContext;
 import org.apache.hadoop.yarn.server.resourcemanager.applicationsmanager.ApplicationsManager;
 import org.apache.hadoop.yarn.util.Apps;
 import org.apache.hadoop.yarn.webapp.ToJSON;
@@ -39,37 +38,39 @@ import org.apache.hadoop.yarn.webapp.Con
 @RequestScoped
 class AppsList implements ToJSON {
   final RequestContext rc;
-  final List<Application> apps;
+  final List<AppContext> apps;
   Render rendering;
 
   @Inject AppsList(RequestContext ctx, ApplicationsManager asm) {
     rc = ctx;
-    apps = asm.getApplications();
+    apps = asm.getAllAppContexts();
   }
 
   void toDataTableArrays(PrintWriter out) {
     out.append('[');
     boolean first = true;
-    for (Application app : apps) {
+    for (AppContext app : apps) {
       if (first) {
         first = false;
       } else {
         out.append(",\n");
       }
-      String appID = Apps.toString(app.getApplicationId());
-      String masterTrackingURL = app.getTrackingUrl();
-      masterTrackingURL = masterTrackingURL == null ? "UNASSIGNED" : masterTrackingURL;
+      String appID = Apps.toString(app.getApplicationID());
+      String trackingUrl = app.getMaster().getTrackingUrl();
+      String ui = trackingUrl == null ? "UNASSIGNED" :
+          (app.getFinishTime() == 0 ? "ApplicationMaster" : "JobHistory");
       out.append("[\"");
-      appendSortable(out, app.getApplicationId().getId());
+      appendSortable(out, app.getApplicationID().getId());
       appendLink(out, appID, rc.prefix(), "app", appID).append(_SEP).
           append(escapeHtml(app.getUser().toString())).append(_SEP).
           append(escapeHtml(app.getName().toString())).append(_SEP).
           append(escapeHtml(app.getQueue())).append(_SEP).
-          append(app.getState().toString()).append(_SEP);
+          append(app.getMaster().getState().toString()).append(_SEP);
       appendProgressBar(out, app.getStatus().getProgress()).append(_SEP);
-      appendLink(out, masterTrackingURL, rc.prefix(),
-          masterTrackingURL == null ? "#" : "http://", masterTrackingURL)
-          .append("\"]");
+      appendLink(out, ui, rc.prefix(),
+                 trackingUrl == null ? "#" : "http://", trackingUrl).
+          append(_SEP).append(escapeHtml(app.getMaster().getDiagnostics())).
+          append("\"]");
     }
     out.append(']');
   }

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodesPage.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodesPage.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodesPage.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodesPage.java Fri Jun 17 20:42:28 2011
@@ -81,7 +81,8 @@ class NodesPage extends RmView {
     setTitle("Nodes of the cluster");
     set(DATATABLES_ID, "nodes");
     set(initID(DATATABLES, "nodes"), nodesTableInit());
-    setTableStyles(html, "nodes");
+    setTableStyles(html, "nodes", ".healthStatus {width:10em}",
+                   ".healthReport {width:10em}");
   }
 
   @Override protected Class<? extends SubView> content() {

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmController.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmController.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmController.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmController.java Fri Jun 17 20:42:28 2011
@@ -24,7 +24,6 @@ import static org.apache.hadoop.yarn.uti
 
 import org.apache.hadoop.util.VersionInfo;
 import org.apache.hadoop.yarn.util.YarnVersionInfo;
-import org.apache.hadoop.yarn.api.records.Application;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
 import org.apache.hadoop.yarn.server.resourcemanager.ResourceManager;
 import org.apache.hadoop.yarn.server.resourcemanager.applicationsmanager.ApplicationsManager;
@@ -37,6 +36,9 @@ import org.apache.hadoop.yarn.webapp.Con
 import org.apache.hadoop.yarn.webapp.ResponseInfo;
 
 import com.google.inject.Inject;
+import org.apache.hadoop.util.StringUtils;
+import org.apache.hadoop.yarn.api.records.Container;
+import org.apache.hadoop.yarn.server.resourcemanager.applicationsmanager.AppContext;
 
 // Do NOT rename/refactor this to RMView as it will wreak havoc
 // on Mac OS HFS as its case-insensitive!
@@ -50,7 +52,7 @@ public class RmController extends Contro
   public void info() {
     setTitle("About the Cluster");
     long ts = ResourceManager.clusterTimeStamp;
-    ResourceManager rm = injector().getInstance(ResourceManager.class);
+    ResourceManager rm = getInstance(ResourceManager.class);
     info("Cluster overview").
       _("Cluster ID:", ts).
       _("ResourceManager state:", rm.getServiceState()).
@@ -68,8 +70,8 @@ public class RmController extends Contro
       return;
     }
     ApplicationId appID = Apps.toAppID(aid);
-    ApplicationsManager asm = injector().getInstance(ApplicationsManager.class);
-    Application app = asm.getApplication(appID);
+    ApplicationsManager asm = getInstance(ApplicationsManager.class);
+    AppContext app = asm.getAppContext(appID);
     if (app == null) {
       // TODO: handle redirect to jobhistory server
       setStatus(response().SC_NOT_FOUND);
@@ -77,23 +79,26 @@ public class RmController extends Contro
       return;
     }
     setTitle(join("Application ", aid));
-    CharSequence masterTrackingURL = app.getTrackingUrl();
-    String ui = masterTrackingURL == null ? "UNASSIGNED" : app.getTrackingUrl();
+    String trackingUrl = app.getMaster().getTrackingUrl();
+    String ui = trackingUrl == null ? "UNASSIGNED" :
+        (app.getFinishTime() == 0 ? "ApplicationMaster" : "JobHistory");
 
     ResponseInfo info = info("Application Overview").
       _("User:", app.getUser()).
       _("Name:", app.getName()).
-      _("State:", app.getState()).
-      _("Started:", "FIXAPI!").
-      _("Elapsed:", "FIXAPI!").
-      _("Master Tracking URL:", join("http://", ui), join("http://", ui)).
-      _("Diagnostics:", app.getDiagnostics());
-    if (app.getMasterContainer() != null) {
-      String masterTrackingURLLink = join("http://", app.getMasterContainer()
-          .getNodeHttpAddress(), "/yarn", "/containerlogs/", ConverterUtils
-          .toString(app.getMasterContainer().getId()));
-      info._("AM container logs:", masterTrackingURLLink,
-          masterTrackingURLLink);
+      _("State:", app.getMaster().getState()).
+      _("Started:", Times.format(app.getStartTime())).
+      _("Elapsed:", StringUtils.formatTime(
+        Times.elapsed(app.getStartTime(), app.getFinishTime()))).
+      _("Tracking URL:", trackingUrl == null ? "#" :
+        join("http://", trackingUrl), ui).
+      _("Diagnostics:", app.getMaster().getDiagnostics());
+    Container masterContainer = app.getMasterContainer();
+    if (masterContainer != null) {
+      String url = join("http://", masterContainer.getNodeHttpAddress(),
+          "/yarn", "/containerlogs/",
+          ConverterUtils.toString(masterContainer.getId()));
+      info._("AM container logs:", url, url);
     } else {
       info._("AM container logs:", "AM not yet registered with RM");
     }
@@ -105,7 +110,7 @@ public class RmController extends Contro
   }
 
   public void scheduler() {
-    ResourceManager rm = injector().getInstance(ResourceManager.class);
+    ResourceManager rm = getInstance(ResourceManager.class);
     ResourceScheduler rs = rm.getResourceScheduler();
     if (rs == null || rs instanceof CapacityScheduler) {
       setTitle("Capacity Scheduler");

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmView.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmView.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmView.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmView.java Fri Jun 17 20:42:28 2011
@@ -35,7 +35,7 @@ public class RmView extends TwoColumnLay
     commonPreHead(html);
     set(DATATABLES_ID, "apps");
     set(initID(DATATABLES, "apps"), appsTableInit());
-    setTableStyles(html, "apps");
+    setTableStyles(html, "apps", ".queue {width:6em}", ".ui {width:8em}");
   }
 
   protected void commonPreHead(Page.HTML<_> html) {
@@ -56,10 +56,11 @@ public class RmView extends TwoColumnLay
   }
 
   private String appsTableInit() {
-    AppsList list = injector().getInstance(AppsList.class);
+    AppsList list = getInstance(AppsList.class);
+    // id, user, name, queue, state, progress, ui, note
     StringBuilder init = tableInit().
         append(", aoColumns:[{sType:'title-numeric'}, null, null, null, null,").
-        append("{sType:'title-numeric', bSearchable:false}, null]");
+        append("{sType:'title-numeric', bSearchable:false}, null, null]");
     String rows = $("rowlimit");
     int rowLimit = rows.isEmpty() ? MAX_DISPLAY_ROWS : Integer.parseInt(rows);
     if (list.apps.size() < rowLimit) {

Added: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/MockAsm.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/MockAsm.java?rev=1137014&view=auto
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/MockAsm.java (added)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/MockAsm.java Fri Jun 17 20:42:28 2011
@@ -0,0 +1,380 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.yarn.server.resourcemanager.applicationsmanager;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import org.apache.hadoop.classification.InterfaceAudience;
+import org.apache.hadoop.security.UserGroupInformation;
+import org.apache.hadoop.yarn.api.records.Application;
+import org.apache.hadoop.yarn.api.records.ApplicationId;
+import org.apache.hadoop.yarn.MockApps;
+import org.apache.hadoop.yarn.api.records.ApplicationMaster;
+import org.apache.hadoop.yarn.api.records.ApplicationState;
+import org.apache.hadoop.yarn.api.records.ApplicationStatus;
+import org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext;
+import org.apache.hadoop.yarn.api.records.Container;
+import org.apache.hadoop.yarn.api.records.ContainerId;
+import org.apache.hadoop.yarn.api.records.Resource;
+import org.apache.hadoop.yarn.server.resourcemanager.recovery.ApplicationsStore.ApplicationStore;
+import org.apache.hadoop.yarn.server.resourcemanager.recovery.Store.RMState;
+import org.apache.hadoop.yarn.util.Records;
+
+@InterfaceAudience.Private
+public abstract class MockAsm extends MockApps {
+  static final int DT = 1000000; // ms
+
+  public static class AppMasterBase implements ApplicationMaster {
+    @Override
+    public ApplicationId getApplicationId() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String getHost() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getRpcPort() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String getTrackingUrl() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public ApplicationStatus getStatus() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public ApplicationState getState() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String getClientToken() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getAMFailCount() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getContainerCount() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String getDiagnostics() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setApplicationId(ApplicationId appId) {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setHost(String host) {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setRpcPort(int rpcPort) {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setTrackingUrl(String url) {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setStatus(ApplicationStatus status) {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setState(ApplicationState state) {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setClientToken(String clientToken) {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setAMFailCount(int amFailCount) {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setContainerCount(int containerCount) {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void setDiagnostics(String diagnostics) {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+  }
+
+  public static class AsmBase implements ApplicationsManager {
+    @Override
+    public ApplicationId getNewApplicationID() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public ApplicationMaster getApplicationMaster(ApplicationId applicationId) {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Application getApplication(ApplicationId applicationID) {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public AppContext getAppContext(ApplicationId appId) {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void submitApplication(ApplicationSubmissionContext context) throws IOException {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void finishApplication(ApplicationId applicationId,
+                                  UserGroupInformation callerUGI) throws IOException {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public List<AppContext> getAllAppContexts() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public List<Application> getApplications() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public void recover(RMState state) throws Exception {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+  }
+
+  public static class AppContextBase implements AppContext {
+    @Override
+    public ApplicationSubmissionContext getSubmissionContext() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Resource getResource() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public ApplicationId getApplicationID() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public ApplicationStatus getStatus() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public ApplicationMaster getMaster() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public Container getMasterContainer() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String getUser() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String getName() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public String getQueue() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public int getFailedCount() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public ApplicationStore getStore() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public long getStartTime() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+
+    @Override
+    public long getFinishTime() {
+      throw new UnsupportedOperationException("Not supported yet.");
+    }
+  }
+
+  public static ApplicationMaster newAppMaster(final ApplicationId id) {
+    final ApplicationState state = newAppState();
+    return new AppMasterBase() {
+      @Override
+      public ApplicationId getApplicationId() {
+        return id;
+      }
+
+      @Override
+      public ApplicationState getState() {
+        return state;
+      }
+
+      @Override
+      public String getTrackingUrl() {
+        return Math.random() < 0.5 ? "host.com:port" : null;
+      }
+
+      @Override
+      public String getDiagnostics() {
+        switch (getState()) {
+          case FAILED: return "Application was failed";
+          case KILLED: return "Appiication was killed. yada yada yada.";
+        }
+        return "";
+      }
+    };
+  }
+
+  public static AppContext newAppContext(int i) {
+    final ApplicationId id = newAppID(i);
+    final ApplicationMaster master = newAppMaster(id);
+    final Container masterContainer = Records.newRecord(Container.class);
+    ContainerId containerId = Records.newRecord(ContainerId.class);
+    containerId.setAppId(id);
+    masterContainer.setId(containerId);
+    masterContainer.setNodeHttpAddress("node:port");
+    final ApplicationStatus status = newAppStatus();
+    final String user = newUserName();
+    final String name = newAppName();
+    final String queue = newQueue();
+    final long start = System.currentTimeMillis() - (int)(Math.random()*DT);
+    final long finish = Math.random() < 0.5 ? 0 :
+        System.currentTimeMillis() + (int)(Math.random()*DT);
+    return new AppContextBase() {
+      @Override
+      public ApplicationId getApplicationID() {
+        return id;
+      }
+
+      @Override
+      public ApplicationStatus getStatus() {
+        return status;
+      }
+
+      @Override
+      public ApplicationMaster getMaster() {
+        return master;
+      }
+
+      @Override
+      public Container getMasterContainer() {
+        return Math.random() < 0.5 ? null : masterContainer;
+      }
+
+      @Override
+      public String getUser() {
+        return user;
+      }
+
+      @Override
+      public String getName() {
+        return name;
+      }
+
+      @Override
+      public String getQueue() {
+        return queue;
+      }
+
+      @Override
+      public long getStartTime() {
+        return start;
+      }
+
+      @Override
+      public long getFinishTime() {
+        return finish;
+      }
+    };
+  }
+  
+  public static List<AppContext> newAppContexts(int n) {
+    List<AppContext> list = Lists.newArrayList();
+    for (int i = 0; i < n; ++i) {
+      list.add(newAppContext(i));
+    }
+    return list;
+  }
+
+  public static ApplicationsManager create(int n) {
+    final List<AppContext> apps = newAppContexts(n);
+    final Map<ApplicationId, AppContext> map = Maps.newHashMap();
+    for (AppContext app : apps) {
+      map.put(app.getApplicationID(), app);
+    }
+    return new AsmBase() {
+      @Override
+      public List<AppContext> getAllAppContexts() {
+        return apps;
+      }
+
+      @Override
+      public AppContext getAppContext(ApplicationId id) {
+        return map.get(id);
+      }
+    };
+  }
+}

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/TestAMRestart.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/TestAMRestart.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/TestAMRestart.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/TestAMRestart.java Fri Jun 17 20:42:28 2011
@@ -300,11 +300,6 @@ public class TestAMRestart extends TestC
     }
 
     @Override
-    public long getLastSeen() {
-      return 0;
-    }
-
-    @Override
     public String getName() {
       return null;
     }
@@ -323,6 +318,14 @@ public class TestAMRestart extends TestC
     public ApplicationStore getStore() {
      return StoreFactory.createVoidAppStore();
     }
+    @Override
+    public long getStartTime() {
+      return 0;
+    }
+    @Override
+    public long getFinishTime() {
+      return 0;
+    }
     
   }
 

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/TestASMStateMachine.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/TestASMStateMachine.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/TestASMStateMachine.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/TestASMStateMachine.java Fri Jun 17 20:42:28 2011
@@ -163,10 +163,6 @@ public class TestASMStateMachine extends
       return null;
     }
     @Override
-    public long getLastSeen() {
-      return 0;
-    }
-    @Override
     public String getName() {
       return null;
     }
@@ -182,6 +178,14 @@ public class TestASMStateMachine extends
     public ApplicationStore getStore() {
       return StoreFactory.createVoidAppStore();
     }
+    @Override
+    public long getStartTime() {
+      return 0;
+    }
+    @Override
+    public long getFinishTime() {
+      return 0;
+    }
   }
 
   private class ApplicationTracker implements EventHandler<ASMEvent<ApplicationTrackerEventType>> {

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebApp.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebApp.java?rev=1137014&r1=1137013&r2=1137014&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebApp.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebApp.java Fri Jun 17 20:42:28 2011
@@ -18,30 +18,18 @@
 
 package org.apache.hadoop.yarn.server.resourcemanager.webapp;
 
-import com.google.common.collect.Maps;
 import com.google.inject.Injector;
-import java.io.IOException;
 
-import java.util.Map;
 import java.util.List;
 
 import static org.apache.hadoop.test.MockitoMaker.*;
 import static org.apache.hadoop.yarn.server.resourcemanager.MockNodes.*;
 import static org.apache.hadoop.yarn.webapp.Params.*;
 
-import org.apache.hadoop.security.UserGroupInformation;
-import org.apache.hadoop.yarn.MockApps;
-import org.apache.hadoop.yarn.api.records.Application;
-import org.apache.hadoop.yarn.api.records.ApplicationId;
-import org.apache.hadoop.yarn.api.records.ApplicationMaster;
-import org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext;
-import org.apache.hadoop.yarn.factories.RecordFactory;
-import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider;
 import org.apache.hadoop.yarn.server.resourcemanager.MockNodes;
 import org.apache.hadoop.yarn.server.resourcemanager.ResourceManager;
-import org.apache.hadoop.yarn.server.resourcemanager.applicationsmanager.AppContext;
 import org.apache.hadoop.yarn.server.resourcemanager.applicationsmanager.ApplicationsManager;
-import org.apache.hadoop.yarn.server.resourcemanager.recovery.Store.RMState;
+import org.apache.hadoop.yarn.server.resourcemanager.applicationsmanager.MockAsm;
 import org.apache.hadoop.yarn.server.resourcemanager.resourcetracker.NodeInfo;
 import org.apache.hadoop.yarn.server.resourcemanager.resourcetracker.RMResourceTrackerImpl;
 import org.apache.hadoop.yarn.server.resourcemanager.resourcetracker.ClusterTracker;
@@ -57,60 +45,6 @@ import static org.mockito.Mockito.*;
 
 public class TestRMWebApp {
   static final int GiB = 1024; // MiB
-  private static final RecordFactory recordFactory = RecordFactoryProvider.getRecordFactory(null);
-
-  static class TestAsm implements ApplicationsManager {
-    final List<Application> appsList;
-    final Map<ApplicationId, Application> appsMap = Maps.newHashMap();
-
-    TestAsm(int n) {
-      appsList = MockApps.genApps(n);
-      for (Application app : appsList) {
-        appsMap.put(app.getApplicationId(), app);
-      }
-    }
-
-    @Override
-    public ApplicationId getNewApplicationID() {
-      throw new UnsupportedOperationException("Not supported yet.");
-    }
-
-    @Override
-    public ApplicationMaster getApplicationMaster(ApplicationId applicationId) {
-      throw new UnsupportedOperationException("Not supported yet.");
-    }
-
-    @Override
-    public Application getApplication(ApplicationId applicationID) {
-      return appsMap.get(applicationID);
-    }
-
-    @Override
-    public void submitApplication(ApplicationSubmissionContext context) throws IOException {
-      throw new UnsupportedOperationException("Not supported yet.");
-    }
-
-    @Override
-    public void finishApplication(ApplicationId applicationId, UserGroupInformation 
-        callingUser) throws IOException {
-      throw new UnsupportedOperationException("Not supported yet.");
-    }
-
-    @Override
-    public List<AppContext> getAllApplications() {
-      throw new UnsupportedOperationException("Not supported yet.");
-    }
-
-    @Override
-    public List<Application> getApplications() {
-      return appsList;
-    }
-
-    @Override
-    public void recover(RMState state) throws Exception {
-      throw new UnsupportedOperationException("Not supported yet.");
-    }
-  }
 
   @Test public void testControllerIndex() {
     Injector injector = WebAppTests.createMockInjector(this);
@@ -120,8 +54,8 @@ public class TestRMWebApp {
   }
 
   @Test public void testView() {
-    Injector injector =
-        WebAppTests.createMockInjector(ApplicationsManager.class, mockAsm(3));
+    Injector injector = WebAppTests.createMockInjector(ApplicationsManager.class,
+                                                       MockAsm.create(3));
     injector.getInstance(RmView.class).render();
     WebAppTests.flushOutput(injector);
   }
@@ -131,10 +65,6 @@ public class TestRMWebApp {
                          mockResource(1, 2, 8*GiB));
   }
 
-  public static ApplicationsManager mockAsm(int n) {
-    return new TestAsm(n);
-  }
-
   public static RMResourceTrackerImpl mockResource(int racks, int nodes,
                                                    int mbsPerNode) {
     final List<NodeInfo> list =
@@ -147,16 +77,16 @@ public class TestRMWebApp {
                                        int mbsPerNode)
   throws Exception {
     ResourceManager rm = mock(ResourceManager.class);
-    ApplicationsManager asm = mockAsm(apps);
+    ApplicationsManager asm = MockAsm.create(apps);
     RMResourceTrackerImpl rt = mockResource(racks, nodes, mbsPerNode);
-    ResourceScheduler rs = mockCS();
+    ResourceScheduler rs = mockCapacityScheduler();
     when(rm.getApplicationsManager()).thenReturn(asm);
     when(rm.getResourceTracker()).thenReturn(rt);
     when(rm.getResourceScheduler()).thenReturn(rs);
     return rm;
   }
 
-  public static CapacityScheduler mockCS() throws Exception {
+  public static CapacityScheduler mockCapacityScheduler() throws Exception {
     // stolen from TestCapacityScheduler
     CapacitySchedulerConfiguration conf = new CapacitySchedulerConfiguration();
     setupQueueConfiguration(conf);
@@ -217,7 +147,7 @@ public class TestRMWebApp {
 
   public static void main(String[] args) throws Exception {
     // For manual testing
-    WebApps.$for("yarn", new TestRMWebApp()).at(8088).inDevMode().
-        start(new RMWebApp(mockRm(101, 8, 8, 8*GiB))).joinThread();
+    WebApps.$for("yarn", new TestRMWebApp()).at(8888).inDevMode().
+        start(new RMWebApp(mockRm(88, 8, 8, 8*GiB))).joinThread();
   }
 }



Mime
View raw message