hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acmur...@apache.org
Subject svn commit: r1091574 [2/2] - in /hadoop/mapreduce/branches/MR-279: ./ mr-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/ mr-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/ mr-client/hadoop...
Date Tue, 12 Apr 2011 21:15:42 GMT
Modified: hadoop/mapreduce/branches/MR-279/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/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppsList.java?rev=1091574&r1=1091573&r2=1091574&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppsList.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/AppsList.java
Tue Apr 12 21:15:37 2011
@@ -29,7 +29,7 @@ import static org.apache.hadoop.yarn.uti
 import static org.apache.hadoop.yarn.webapp.view.JQueryUI.*;
 import static org.apache.hadoop.yarn.webapp.view.Jsons.*;
 
-import org.apache.hadoop.yarn.Application;
+import org.apache.hadoop.yarn.api.records.Application;
 import org.apache.hadoop.yarn.server.resourcemanager.applicationsmanager.ApplicationsManager;
 import org.apache.hadoop.yarn.util.Apps;
 import org.apache.hadoop.yarn.webapp.ToJSON;
@@ -56,17 +56,17 @@ class AppsList implements ToJSON {
       } else {
         out.append(",\n");
       }
-      String appID = Apps.toString(app.id());
-      CharSequence master = app.master();
+      String appID = Apps.toString(app.getApplicationId());
+      CharSequence master = app.getMasterHost();
       String ui = master == null ? "UNASSIGNED"
-                                 : join(master, ':', app.httpPort());
+                                 : join(master, ':', app.getMasterPort());
       out.append("[\"");
-      appendSortable(out, app.id().getId());
+      appendSortable(out, app.getApplicationId().getId());
       appendLink(out, appID, rc.prefix(), "app", appID).append(_SEP).
-          append(escapeHtml(app.user().toString())).append(_SEP).
-          append(escapeHtml(app.name().toString())).append(_SEP).
-          append(app.state().toString()).append(_SEP);
-      appendProgressBar(out, app.status().getProgress()).append(_SEP);
+          append(escapeHtml(app.getUser().toString())).append(_SEP).
+          append(escapeHtml(app.getName().toString())).append(_SEP).
+          append(app.getState().toString()).append(_SEP);
+      appendProgressBar(out, app.getStatus().getProgress()).append(_SEP);
       appendLink(out, ui, rc.prefix(), master == null ? "#" : "http://", ui).
           append("\"]");
     }

Modified: hadoop/mapreduce/branches/MR-279/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/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmController.java?rev=1091574&r1=1091573&r2=1091574&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmController.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/RmController.java
Tue Apr 12 21:15:37 2011
@@ -23,8 +23,9 @@ import com.google.inject.Inject;
 import java.util.Date;
 
 import org.apache.hadoop.util.VersionInfo;
-import org.apache.hadoop.yarn.Application;
+import org.apache.hadoop.yarn.api.records.Application;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
+import org.apache.hadoop.yarn.api.records.ApplicationState;
 import org.apache.hadoop.yarn.server.resourcemanager.ResourceManager;
 import org.apache.hadoop.yarn.server.resourcemanager.applicationsmanager.ApplicationsManager;
 import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ResourceScheduler;
@@ -75,18 +76,20 @@ public class RmController extends Contro
       return;
     }
     setTitle(join("Application ", aid));
-    CharSequence master = app.master();
+    CharSequence master = app.getMasterHost();
     String ui = master == null ? "UNASSIGNED"
-                               : join(master, ':', app.httpPort());
+                               : join(master, ':', app.getMasterPort());
 
     ResponseInfo info = info("Application Overview").
-      _("User:", app.user()).
-      _("Name:", app.name()).
-      _("State:", app.state()).
+      _("User:", app.getUser()).
+      _("Name:", app.getName()).
+      _("State:", app.getState()).
       _("Started:", "FIXAPI!").
       _("Elapsed:", "FIXAPI!").
       _("Master UI:", master == null ? "#" : join("http://", ui), ui);
-    if (app.isFinished()) {
+    if (app.getState() == ApplicationState.COMPLETED || 
+        app.getState() == ApplicationState.FAILED || 
+        app.getState() == ApplicationState.KILLED) {
       info._("History:", "FIXAPI!");
     }
     render(InfoPage.class);

Modified: hadoop/mapreduce/branches/MR-279/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/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebApp.java?rev=1091574&r1=1091573&r2=1091574&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebApp.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/TestRMWebApp.java
Tue Apr 12 21:15:37 2011
@@ -29,8 +29,8 @@ import static org.apache.hadoop.test.Moc
 import static org.apache.hadoop.yarn.server.resourcemanager.MockNodes.*;
 import static org.apache.hadoop.yarn.webapp.Params.*;
 
-import org.apache.hadoop.yarn.Application;
 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;
@@ -64,7 +64,7 @@ public class TestRMWebApp {
     TestAsm(int n) {
       appsList = MockApps.genApps(n);
       for (Application app : appsList) {
-        appsMap.put(app.id(), app);
+        appsMap.put(app.getApplicationId(), app);
       }
     }
 

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-tests/src/test/java/org/apache/hadoop/yarn/server/TestContainerTokenSecretManager.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-tests/src/test/java/org/apache/hadoop/yarn/server/TestContainerTokenSecretManager.java?rev=1091574&r1=1091573&r2=1091574&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-tests/src/test/java/org/apache/hadoop/yarn/server/TestContainerTokenSecretManager.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-tests/src/test/java/org/apache/hadoop/yarn/server/TestContainerTokenSecretManager.java
Tue Apr 12 21:15:37 2011
@@ -41,13 +41,13 @@ import org.apache.hadoop.net.NetUtils;
 import org.apache.hadoop.security.SecurityInfo;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.hadoop.security.token.Token;
-import org.apache.hadoop.yarn.Application;
 import org.apache.hadoop.yarn.YarnException;
 import org.apache.hadoop.yarn.api.AMRMProtocol;
 import org.apache.hadoop.yarn.api.ContainerManager;
 import org.apache.hadoop.yarn.api.protocolrecords.AllocateRequest;
 import org.apache.hadoop.yarn.api.protocolrecords.GetContainerStatusRequest;
 import org.apache.hadoop.yarn.api.protocolrecords.RegisterApplicationMasterRequest;
+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.ApplicationState;
@@ -127,16 +127,16 @@ public class TestContainerTokenSecretMan
     Application app =
         resourceManager.getApplicationsManager().getApplication(
             containerID.getAppId());
-    while (app.state() != ApplicationState.LAUNCHED && waitCounter <= 20) {
+    while (app.getState() != ApplicationState.LAUNCHED && waitCounter <= 20) {
       Thread.sleep(1000);
       LOG.info("Waiting for AM to be allocated a container. Current state is "
-          + app.state());
+          + app.getState());
       app =
           resourceManager.getApplicationsManager().getApplication(
               containerID.getAppId());
     }
 
-    Assert.assertTrue(ApplicationState.PENDING != app.state());
+    Assert.assertTrue(ApplicationState.PENDING != app.getState());
 
     UserGroupInformation currentUser = UserGroupInformation.getCurrentUser();
 



Mime
View raw message