hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vino...@apache.org
Subject svn commit: r1143250 [1/4] - in /hadoop/common/branches/MR-279/mapreduce: ./ mr-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/launcher/ mr-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapre...
Date Wed, 06 Jul 2011 04:51:48 GMT
Author: vinodkv
Date: Wed Jul  6 04:51:46 2011
New Revision: 1143250

URL: http://svn.apache.org/viewvc?rev=1143250&view=rev
Log:
Major ASM/RM cleanup. Streamlining classes, interface and events. Contributed by Vinod Kumar Vavilapalli.

Added:
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportRequest.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportResponse.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetApplicationReportRequestPBImpl.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetApplicationReportResponsePBImpl.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationReportPBImpl.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ApplicationsManager.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/Application.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationImpl.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/events/AMAllocatedEvent.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/events/AMFinishEvent.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/events/AMLauncherEventType.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/events/AMRegistrationEvent.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/events/AMStatusUpdateEvent.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/events/ApplicationEvent.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/events/ApplicationEventType.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/events/ApplicationTrackerEventType.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/events/SNEventType.java
Removed:
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationMasterRequest.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationMasterResponse.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetApplicationMasterRequestPBImpl.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetApplicationMasterResponsePBImpl.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Application.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationPBImpl.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/ApplicationFinishEvent.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationMasterAllocatedEvent.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationMasterHandler.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/ApplicationMasterInfoEvent.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationMasterRegistrationEvent.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationMasterStatusUpdateEvent.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/events/ApplicationFinishEvent.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/events/ApplicationMasterEvents.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/launcher/ContainerLauncherImpl.java
    hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/TypeConverter.java
    hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ClientServiceDelegate.java
    hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ResourceMgrDelegate.java
    hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java
    hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestClientRedirect.java
    hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/TestMRJobsWithHistoryService.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/ClientRMProtocol.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetAllApplicationsResponse.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetAllApplicationsResponsePBImpl.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueInfo.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/QueueInfoPBImpl.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/proto/client_RM_protocol.proto
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/proto/yarn_protos.proto
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/proto/yarn_service_protos.proto
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/api/impl/pb/client/ClientRMProtocolPBClientImpl.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/api/impl/pb/service/ClientRMProtocolPBServiceImpl.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/ApplicationMasterService.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ClientRMService.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceManager.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/AMLauncher.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/AMLivelinessMonitor.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/ApplicationMasterLauncher.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/applicationsmanager/events/ASMEvent.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/Application.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/ResourceScheduler.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CapacityScheduler.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/LeafQueue.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/ParentQueue.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/fifo/FifoScheduler.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/RMWebApp.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/test/java/org/apache/hadoop/yarn/server/resourcemanager/Application.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/MockAsm.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/TestAMLaunchFailure.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/TestAMRMRPCResponseId.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/applicationsmanager/TestApplicationCleanup.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/TestApplicationMasterExpiry.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/TestApplicationMasterLauncher.java
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/applicationsmanager/TestSchedulerNegotiator.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
    hadoop/common/branches/MR-279/mapreduce/yarn/yarn-server/yarn-server-tests/src/test/java/org/apache/hadoop/yarn/server/TestContainerTokenSecretManager.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=1143250&r1=1143249&r2=1143250&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/CHANGES.txt (original)
+++ hadoop/common/branches/MR-279/mapreduce/CHANGES.txt Wed Jul  6 04:51:46 2011
@@ -5,6 +5,8 @@ Trunk (unreleased changes)
 
     MAPREDUCE-279
 
+    Major ASM cleanup. Streamlining classes, interface and events. (vinodkv)
+
     (1) Faster retries from AM to HistoryServer (2) Correct diagnostics for
     containers. (vinodkv)
 

Modified: hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/launcher/ContainerLauncherImpl.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/launcher/ContainerLauncherImpl.java?rev=1143250&r1=1143249&r2=1143250&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/launcher/ContainerLauncherImpl.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/launcher/ContainerLauncherImpl.java Wed Jul  6 04:51:46 2011
@@ -138,6 +138,7 @@ public class ContainerLauncherImpl exten
 
     UserGroupInformation user = UserGroupInformation.getCurrentUser();
 
+    // TODO: Synchronization problems!!
     if (UserGroupInformation.isSecurityEnabled()) {
       if(!ugiMap.containsKey(containerManagerBindAddr)) {
         Token<ContainerTokenIdentifier> token =

Modified: hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/TypeConverter.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/TypeConverter.java?rev=1143250&r1=1143249&r2=1143250&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/TypeConverter.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/TypeConverter.java Wed Jul  6 04:51:46 2011
@@ -18,8 +18,6 @@
 
 package org.apache.hadoop.mapreduce;
 
-import java.net.MalformedURLException;
-import java.net.URL;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -42,8 +40,8 @@ import org.apache.hadoop.mapreduce.v2.ap
 import org.apache.hadoop.mapreduce.v2.api.records.TaskState;
 import org.apache.hadoop.mapreduce.v2.api.records.TaskType;
 import org.apache.hadoop.yarn.YarnException;
-import org.apache.hadoop.yarn.api.records.Application;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
+import org.apache.hadoop.yarn.api.records.ApplicationReport;
 import org.apache.hadoop.yarn.api.records.ApplicationState;
 import org.apache.hadoop.yarn.api.records.NodeManagerInfo;
 import org.apache.hadoop.yarn.api.records.QueueACL;
@@ -404,7 +402,7 @@ public class TypeConverter {
     return taskTrackers.toArray(new TaskTrackerInfo[nodes.size()]);
   }
 
-  public static JobStatus fromYarn(Application application) {
+  public static JobStatus fromYarn(ApplicationReport application) {
     String trackingUrl = application.getTrackingUrl();
     trackingUrl = trackingUrl == null ? "" : trackingUrl;
 
@@ -421,9 +419,9 @@ public class TypeConverter {
     return jobStatus;
   }
 
-  public static JobStatus[] fromYarnApps(List<Application> applications) {
+  public static JobStatus[] fromYarnApps(List<ApplicationReport> applications) {
     List<JobStatus> jobStatuses = new ArrayList<JobStatus>();
-    for (Application application : applications) {
+    for (ApplicationReport application : applications) {
       jobStatuses.add(TypeConverter.fromYarn(application));
     }
     return jobStatuses.toArray(new JobStatus[jobStatuses.size()]);

Modified: hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ClientServiceDelegate.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ClientServiceDelegate.java?rev=1143250&r1=1143249&r2=1143250&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ClientServiceDelegate.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ClientServiceDelegate.java Wed Jul  6 04:51:46 2011
@@ -53,7 +53,7 @@ import org.apache.hadoop.security.UserGr
 import org.apache.hadoop.security.token.Token;
 import org.apache.hadoop.yarn.YarnException;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
-import org.apache.hadoop.yarn.api.records.ApplicationMaster;
+import org.apache.hadoop.yarn.api.records.ApplicationReport;
 import org.apache.hadoop.yarn.api.records.ApplicationState;
 import org.apache.hadoop.yarn.exceptions.YarnRemoteException;
 import org.apache.hadoop.yarn.factories.RecordFactory;
@@ -106,30 +106,30 @@ public class ClientServiceDelegate {
     //TODO RM NPEs for unknown jobs. History may still be aware.
     // Possibly allow nulls through the PB tunnel, otherwise deal with an exception
     // and redirect to the history server.
-    ApplicationMaster appMaster = rm.getApplicationMaster(currentAppId);
-    while (!ApplicationState.COMPLETED.equals(appMaster.getState()) &&
-        !ApplicationState.FAILED.equals(appMaster.getState()) && 
-        !ApplicationState.KILLED.equals(appMaster.getState()) &&
-        !ApplicationState.ALLOCATING.equals(appMaster.getState())) {
+    ApplicationReport application = rm.getApplicationReport(currentAppId);
+    while (!ApplicationState.COMPLETED.equals(application.getState()) &&
+        !ApplicationState.FAILED.equals(application.getState()) && 
+        !ApplicationState.KILLED.equals(application.getState()) &&
+        !ApplicationState.ALLOCATING.equals(application.getState())) {
       try {
-        if (appMaster.getHost() == null || "".equals(appMaster.getHost())) {
+        if (application.getHost() == null || "".equals(application.getHost())) {
           LOG.debug("AM not assigned to Job. Waiting to get the AM ...");
           Thread.sleep(2000);
    
-          LOG.debug("Application state is " + appMaster.getState());
-          appMaster = rm.getApplicationMaster(currentAppId);
+          LOG.debug("Application state is " + application.getState());
+          application = rm.getApplicationReport(currentAppId);
           continue;
         }
-        serviceAddr = appMaster.getHost() + ":" + appMaster.getRpcPort();
-        serviceHttpAddr = appMaster.getTrackingUrl();
-        currentAppState = appMaster.getState();
+        serviceAddr = application.getHost() + ":" + application.getRpcPort();
+        serviceHttpAddr = application.getTrackingUrl();
+        currentAppState = application.getState();
         if (UserGroupInformation.isSecurityEnabled()) {
-          String clientTokenEncoded = appMaster.getClientToken();
+          String clientTokenEncoded = application.getClientToken();
           Token<ApplicationTokenIdentifier> clientToken =
             new Token<ApplicationTokenIdentifier>();
           clientToken.decodeFromUrlString(clientTokenEncoded);
-          clientToken.setService(new Text(appMaster.getHost() + ":"
-              + appMaster.getRpcPort()));
+          clientToken.setService(new Text(application.getHost() + ":"
+              + application.getRpcPort()));
           UserGroupInformation.getCurrentUser().addToken(clientToken);
         }
         LOG.info("Connecting to " + serviceAddr);
@@ -146,11 +146,11 @@ public class ClientServiceDelegate {
           Thread.sleep(2000);
         } catch (InterruptedException e1) {
         }
-        appMaster = rm.getApplicationMaster(currentAppId);
+        application = rm.getApplicationReport(currentAppId);
       }
     }
 
-    currentAppState = appMaster.getState();
+    currentAppState = application.getState();
     /** we just want to return if its allocating, so that we dont 
      * block on it. This is to be able to return job status 
      * on a allocating Application.

Modified: hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ResourceMgrDelegate.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ResourceMgrDelegate.java?rev=1143250&r1=1143249&r2=1143250&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ResourceMgrDelegate.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/ResourceMgrDelegate.java Wed Jul  6 04:51:46 2011
@@ -48,8 +48,8 @@ import org.apache.hadoop.yarn.api.Client
 import org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationRequest;
 import org.apache.hadoop.yarn.api.protocolrecords.GetAllApplicationsRequest;
 import org.apache.hadoop.yarn.api.protocolrecords.GetAllApplicationsResponse;
-import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationMasterRequest;
-import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationMasterResponse;
+import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportRequest;
+import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportResponse;
 import org.apache.hadoop.yarn.api.protocolrecords.GetClusterMetricsRequest;
 import org.apache.hadoop.yarn.api.protocolrecords.GetClusterMetricsResponse;
 import org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodesRequest;
@@ -60,6 +60,7 @@ import org.apache.hadoop.yarn.api.protoc
 import org.apache.hadoop.yarn.api.protocolrecords.SubmitApplicationRequest;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
 import org.apache.hadoop.yarn.api.records.ApplicationMaster;
+import org.apache.hadoop.yarn.api.records.ApplicationReport;
 import org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext;
 import org.apache.hadoop.yarn.api.records.QueueUserACLInfo;
 import org.apache.hadoop.yarn.api.records.YarnClusterMetrics;
@@ -301,13 +302,16 @@ public class ResourceMgrDelegate {
     LOG.info("Killing application " + applicationId);
   }
 
-  public ApplicationMaster getApplicationMaster(ApplicationId appId) 
-    throws YarnRemoteException {
-    GetApplicationMasterRequest request = recordFactory.newRecordInstance(GetApplicationMasterRequest.class);
+
+  public ApplicationReport getApplicationReport(ApplicationId appId)
+      throws YarnRemoteException {
+    GetApplicationReportRequest request = recordFactory
+        .newRecordInstance(GetApplicationReportRequest.class);
     request.setApplicationId(appId);
-    GetApplicationMasterResponse response = applicationsManager.getApplicationMaster(request);
-    ApplicationMaster appMaster = response.getApplicationMaster(); 
-    return appMaster;
+    GetApplicationReportResponse response = applicationsManager
+        .getApplicationReport(request);
+    ApplicationReport applicationReport = response.getApplicationReport();
+    return applicationReport;
   }
 
   public ApplicationId getApplicationId() {

Modified: hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java?rev=1143250&r1=1143249&r2=1143250&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/main/java/org/apache/hadoop/mapred/YARNRunner.java Wed Jul  6 04:51:46 2011
@@ -68,7 +68,7 @@ import org.apache.hadoop.security.token.
 import org.apache.hadoop.yarn.YarnException;
 import org.apache.hadoop.yarn.api.ApplicationConstants;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
-import org.apache.hadoop.yarn.api.records.ApplicationMaster;
+import org.apache.hadoop.yarn.api.records.ApplicationReport;
 import org.apache.hadoop.yarn.api.records.ApplicationState;
 import org.apache.hadoop.yarn.api.records.ApplicationSubmissionContext;
 import org.apache.hadoop.yarn.api.records.LocalResource;
@@ -240,8 +240,8 @@ public class YARNRunner implements Clien
     // Submit to ResourceManager
     ApplicationId applicationId = resMgrDelegate.submitApplication(appContext);
     
-    ApplicationMaster appMaster = 
-      resMgrDelegate.getApplicationMaster(applicationId);
+    ApplicationReport appMaster = resMgrDelegate
+        .getApplicationReport(applicationId);
     if (appMaster.getState() == ApplicationState.FAILED || appMaster.getState() ==
       ApplicationState.KILLED) {
       throw RPCUtil.getRemoteException("failed to run job");

Modified: hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestClientRedirect.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestClientRedirect.java?rev=1143250&r1=1143249&r2=1143250&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestClientRedirect.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapred/TestClientRedirect.java Wed Jul  6 04:51:46 2011
@@ -29,7 +29,6 @@ import org.apache.avro.ipc.Server;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.fs.CommonConfigurationKeysPublic;
 import org.apache.hadoop.mapreduce.ClientFactory;
 import org.apache.hadoop.mapreduce.Cluster;
 import org.apache.hadoop.mapreduce.v2.api.MRClientProtocol;
@@ -70,8 +69,8 @@ import org.apache.hadoop.yarn.api.protoc
 import org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationResponse;
 import org.apache.hadoop.yarn.api.protocolrecords.GetAllApplicationsRequest;
 import org.apache.hadoop.yarn.api.protocolrecords.GetAllApplicationsResponse;
-import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationMasterRequest;
-import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationMasterResponse;
+import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportRequest;
+import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportResponse;
 import org.apache.hadoop.yarn.api.protocolrecords.GetClusterMetricsRequest;
 import org.apache.hadoop.yarn.api.protocolrecords.GetClusterMetricsResponse;
 import org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodesRequest;
@@ -85,7 +84,7 @@ import org.apache.hadoop.yarn.api.protoc
 import org.apache.hadoop.yarn.api.protocolrecords.SubmitApplicationRequest;
 import org.apache.hadoop.yarn.api.protocolrecords.SubmitApplicationResponse;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
-import org.apache.hadoop.yarn.api.records.ApplicationMaster;
+import org.apache.hadoop.yarn.api.records.ApplicationReport;
 import org.apache.hadoop.yarn.api.records.ApplicationState;
 import org.apache.hadoop.yarn.api.records.ApplicationStatus;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
@@ -220,22 +219,26 @@ public class TestClientRedirect {
     }
     
     @Override
-    public GetApplicationMasterResponse getApplicationMaster(GetApplicationMasterRequest request) throws YarnRemoteException {
+    public GetApplicationReportResponse getApplicationReport(
+        GetApplicationReportRequest request) throws YarnRemoteException {
       ApplicationId applicationId = request.getApplicationId();
-      ApplicationMaster master = recordFactory.newRecordInstance(ApplicationMaster.class);
-      master.setApplicationId(applicationId);
-      master.setStatus(recordFactory.newRecordInstance(ApplicationStatus.class));
-      master.getStatus().setApplicationId(applicationId);
+      ApplicationReport application = recordFactory
+          .newRecordInstance(ApplicationReport.class);
+      application.setApplicationId(applicationId);
+      application.setStatus(recordFactory
+          .newRecordInstance(ApplicationStatus.class));
+      application.getStatus().setApplicationId(applicationId);
       if (amRunning) {
-        master.setState(ApplicationState.RUNNING);
+        application.setState(ApplicationState.RUNNING);
       } else {
-        master.setState(ApplicationState.COMPLETED);
+        application.setState(ApplicationState.COMPLETED);
       }
       String[] split = AMHOSTADDRESS.split(":");
-      master.setHost(split[0]);
-      master.setRpcPort(Integer.parseInt(split[1]));
-      GetApplicationMasterResponse response = recordFactory.newRecordInstance(GetApplicationMasterResponse.class);
-      response.setApplicationMaster(master);
+      application.setHost(split[0]);
+      application.setRpcPort(Integer.parseInt(split[1]));
+      GetApplicationReportResponse response = recordFactory
+          .newRecordInstance(GetApplicationReportResponse.class);
+      response.setApplicationReport(application);
       return response;
     }
 

Modified: hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/TestMRJobsWithHistoryService.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/TestMRJobsWithHistoryService.java?rev=1143250&r1=1143249&r2=1143250&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/TestMRJobsWithHistoryService.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/mr-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/TestMRJobsWithHistoryService.java Wed Jul  6 04:51:46 2011
@@ -116,8 +116,8 @@ public class TestMRJobsWithHistoryServic
     ApplicationId appID = TypeConverter.toYarn(job.getJobID()).getAppId();
     while (true) {
       Thread.sleep(1000);
-      if (mrCluster.getResourceManager().getApplicationsManager()
-          .getApplication(appID).getState().equals(ApplicationState.COMPLETED))
+      if (mrCluster.getResourceManager().getRMContext().getApplications()
+          .get(appID).getState().equals(ApplicationState.COMPLETED))
         break;
     }
     Counters counterHS = job.getCounters();

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/ClientRMProtocol.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/ClientRMProtocol.java?rev=1143250&r1=1143249&r2=1143250&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/ClientRMProtocol.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/ClientRMProtocol.java Wed Jul  6 04:51:46 2011
@@ -4,8 +4,8 @@ import org.apache.hadoop.yarn.api.protoc
 import org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationResponse;
 import org.apache.hadoop.yarn.api.protocolrecords.GetAllApplicationsRequest;
 import org.apache.hadoop.yarn.api.protocolrecords.GetAllApplicationsResponse;
-import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationMasterRequest;
-import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationMasterResponse;
+import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportRequest;
+import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportResponse;
 import org.apache.hadoop.yarn.api.protocolrecords.GetClusterMetricsRequest;
 import org.apache.hadoop.yarn.api.protocolrecords.GetClusterMetricsResponse;
 import org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodesRequest;
@@ -22,7 +22,7 @@ import org.apache.hadoop.yarn.exceptions
 
 public interface ClientRMProtocol {
   public GetNewApplicationIdResponse getNewApplicationId(GetNewApplicationIdRequest request) throws YarnRemoteException;
-  public GetApplicationMasterResponse getApplicationMaster(GetApplicationMasterRequest request) throws YarnRemoteException;
+  public GetApplicationReportResponse getApplicationReport(GetApplicationReportRequest request) throws YarnRemoteException;
   public SubmitApplicationResponse submitApplication(SubmitApplicationRequest request) throws YarnRemoteException;
   public FinishApplicationResponse finishApplication(FinishApplicationRequest request) throws YarnRemoteException;
   public GetClusterMetricsResponse getClusterMetrics(GetClusterMetricsRequest request) throws YarnRemoteException;

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetAllApplicationsResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetAllApplicationsResponse.java?rev=1143250&r1=1143249&r2=1143250&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetAllApplicationsResponse.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetAllApplicationsResponse.java Wed Jul  6 04:51:46 2011
@@ -2,9 +2,9 @@ package org.apache.hadoop.yarn.api.proto
 
 import java.util.List;
 
-import org.apache.hadoop.yarn.api.records.Application;
+import org.apache.hadoop.yarn.api.records.ApplicationReport;
 
 public interface GetAllApplicationsResponse {
-  List<Application> getApplicationList();
-  void setApplicationList(List<Application> applications);
+  List<ApplicationReport> getApplicationList();
+  void setApplicationList(List<ApplicationReport> applications);
 }

Added: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportRequest.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportRequest.java?rev=1143250&view=auto
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportRequest.java (added)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportRequest.java Wed Jul  6 04:51:46 2011
@@ -0,0 +1,8 @@
+package org.apache.hadoop.yarn.api.protocolrecords;
+
+import org.apache.hadoop.yarn.api.records.ApplicationId;
+
+public interface GetApplicationReportRequest {
+  public abstract ApplicationId getApplicationId();
+  public abstract void setApplicationId(ApplicationId applicationId);
+}

Added: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportResponse.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportResponse.java?rev=1143250&view=auto
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportResponse.java (added)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/GetApplicationReportResponse.java Wed Jul  6 04:51:46 2011
@@ -0,0 +1,8 @@
+package org.apache.hadoop.yarn.api.protocolrecords;
+
+import org.apache.hadoop.yarn.api.records.ApplicationReport;
+
+public interface GetApplicationReportResponse {
+  public abstract ApplicationReport getApplicationReport();
+  public abstract void setApplicationReport(ApplicationReport ApplicationReport);
+}

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetAllApplicationsResponsePBImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetAllApplicationsResponsePBImpl.java?rev=1143250&r1=1143249&r2=1143250&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetAllApplicationsResponsePBImpl.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetAllApplicationsResponsePBImpl.java Wed Jul  6 04:51:46 2011
@@ -5,10 +5,10 @@ import java.util.Iterator;
 import java.util.List;
 
 import org.apache.hadoop.yarn.api.protocolrecords.GetAllApplicationsResponse;
-import org.apache.hadoop.yarn.api.records.Application;
+import org.apache.hadoop.yarn.api.records.ApplicationReport;
 import org.apache.hadoop.yarn.api.records.ProtoBase;
-import org.apache.hadoop.yarn.api.records.impl.pb.ApplicationPBImpl;
-import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationProto;
+import org.apache.hadoop.yarn.api.records.impl.pb.ApplicationReportPBImpl;
+import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto;
 import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetAllApplicationsResponseProto;
 import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetAllApplicationsResponseProtoOrBuilder;
 
@@ -21,7 +21,7 @@ GetAllApplicationsResponse {
   GetAllApplicationsResponseProto.Builder builder = null;
   boolean viaProto = false;
 
-  List<Application> applicationList;
+  List<ApplicationReport> applicationList;
   
   public GetAllApplicationsResponsePBImpl() {
     builder = GetAllApplicationsResponseProto.newBuilder();
@@ -33,13 +33,13 @@ GetAllApplicationsResponse {
   }
 
   @Override
-  public List<Application> getApplicationList() {    
+  public List<ApplicationReport> getApplicationList() {    
     initLocalApplicationsList();
     return this.applicationList;
   }
 
   @Override
-  public void setApplicationList(List<Application> applications) {
+  public void setApplicationList(List<ApplicationReport> applications) {
     maybeInitBuilder();
     if (applications == null) 
       builder.clearApplications();
@@ -81,10 +81,10 @@ GetAllApplicationsResponse {
       return;
     }
     GetAllApplicationsResponseProtoOrBuilder p = viaProto ? proto : builder;
-    List<ApplicationProto> list = p.getApplicationsList();
-    applicationList = new ArrayList<Application>();
+    List<ApplicationReportProto> list = p.getApplicationsList();
+    applicationList = new ArrayList<ApplicationReport>();
 
-    for (ApplicationProto a : list) {
+    for (ApplicationReportProto a : list) {
       applicationList.add(convertFromProtoFormat(a));
     }
   }
@@ -94,12 +94,12 @@ GetAllApplicationsResponse {
     builder.clearApplications();
     if (applicationList == null)
       return;
-    Iterable<ApplicationProto> iterable = new Iterable<ApplicationProto>() {
+    Iterable<ApplicationReportProto> iterable = new Iterable<ApplicationReportProto>() {
       @Override
-      public Iterator<ApplicationProto> iterator() {
-        return new Iterator<ApplicationProto>() {
+      public Iterator<ApplicationReportProto> iterator() {
+        return new Iterator<ApplicationReportProto>() {
 
-          Iterator<Application> iter = applicationList.iterator();
+          Iterator<ApplicationReport> iter = applicationList.iterator();
 
           @Override
           public boolean hasNext() {
@@ -107,7 +107,7 @@ GetAllApplicationsResponse {
           }
 
           @Override
-          public ApplicationProto next() {
+          public ApplicationReportProto next() {
             return convertToProtoFormat(iter.next());
           }
 
@@ -123,12 +123,12 @@ GetAllApplicationsResponse {
     builder.addAllApplications(iterable);
   }
 
-  private ApplicationPBImpl convertFromProtoFormat(ApplicationProto p) {
-    return new ApplicationPBImpl(p);
+  private ApplicationReportPBImpl convertFromProtoFormat(ApplicationReportProto p) {
+    return new ApplicationReportPBImpl(p);
   }
 
-  private ApplicationProto convertToProtoFormat(Application t) {
-    return ((ApplicationPBImpl)t).getProto();
+  private ApplicationReportProto convertToProtoFormat(ApplicationReport t) {
+    return ((ApplicationReportPBImpl)t).getProto();
   }
 
 }

Added: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetApplicationReportRequestPBImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetApplicationReportRequestPBImpl.java?rev=1143250&view=auto
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetApplicationReportRequestPBImpl.java (added)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetApplicationReportRequestPBImpl.java Wed Jul  6 04:51:46 2011
@@ -0,0 +1,91 @@
+package org.apache.hadoop.yarn.api.protocolrecords.impl.pb;
+
+
+import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportRequest;
+import org.apache.hadoop.yarn.api.records.ApplicationId;
+import org.apache.hadoop.yarn.api.records.ProtoBase;
+import org.apache.hadoop.yarn.api.records.impl.pb.ApplicationIdPBImpl;
+import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationIdProto;
+import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicationReportRequestProto;
+import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicationReportRequestProtoOrBuilder;
+
+
+    
+public class GetApplicationReportRequestPBImpl extends ProtoBase<GetApplicationReportRequestProto> implements GetApplicationReportRequest {
+  GetApplicationReportRequestProto proto = GetApplicationReportRequestProto.getDefaultInstance();
+  GetApplicationReportRequestProto.Builder builder = null;
+  boolean viaProto = false;
+  
+  private ApplicationId applicationId = null;
+  
+  
+  public GetApplicationReportRequestPBImpl() {
+    builder = GetApplicationReportRequestProto.newBuilder();
+  }
+
+  public GetApplicationReportRequestPBImpl(GetApplicationReportRequestProto proto) {
+    this.proto = proto;
+    viaProto = true;
+  }
+  
+  public GetApplicationReportRequestProto getProto() {
+      mergeLocalToProto();
+    proto = viaProto ? proto : builder.build();
+    viaProto = true;
+    return proto;
+  }
+
+  private void mergeLocalToBuilder() {
+    if (applicationId != null) {
+      builder.setApplicationId(convertToProtoFormat(this.applicationId));
+    }
+  }
+
+  private void mergeLocalToProto() {
+    if (viaProto) 
+      maybeInitBuilder();
+    mergeLocalToBuilder();
+    proto = builder.build();
+    viaProto = true;
+  }
+
+  private void maybeInitBuilder() {
+    if (viaProto || builder == null) {
+      builder = GetApplicationReportRequestProto.newBuilder(proto);
+    }
+    viaProto = false;
+  }
+    
+  
+  @Override
+  public ApplicationId getApplicationId() {
+    GetApplicationReportRequestProtoOrBuilder p = viaProto ? proto : builder;
+    if (this.applicationId != null) {
+      return this.applicationId;
+    }
+    if (!p.hasApplicationId()) {
+      return null;
+    }
+    this.applicationId = convertFromProtoFormat(p.getApplicationId());
+    return this.applicationId;
+  }
+
+  @Override
+  public void setApplicationId(ApplicationId applicationId) {
+    maybeInitBuilder();
+    if (applicationId == null) 
+      builder.clearApplicationId();
+    this.applicationId = applicationId;
+  }
+
+  private ApplicationIdPBImpl convertFromProtoFormat(ApplicationIdProto p) {
+    return new ApplicationIdPBImpl(p);
+  }
+
+  private ApplicationIdProto convertToProtoFormat(ApplicationId t) {
+    return ((ApplicationIdPBImpl)t).getProto();
+  }
+
+
+
+}  

Added: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetApplicationReportResponsePBImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetApplicationReportResponsePBImpl.java?rev=1143250&view=auto
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetApplicationReportResponsePBImpl.java (added)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/protocolrecords/impl/pb/GetApplicationReportResponsePBImpl.java Wed Jul  6 04:51:46 2011
@@ -0,0 +1,91 @@
+package org.apache.hadoop.yarn.api.protocolrecords.impl.pb;
+
+
+import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportResponse;
+import org.apache.hadoop.yarn.api.records.ApplicationReport;
+import org.apache.hadoop.yarn.api.records.ProtoBase;
+import org.apache.hadoop.yarn.api.records.impl.pb.ApplicationReportPBImpl;
+import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto;
+import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicationReportResponseProto;
+import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicationReportResponseProtoOrBuilder;
+
+
+    
+public class GetApplicationReportResponsePBImpl extends ProtoBase<GetApplicationReportResponseProto> implements GetApplicationReportResponse {
+  GetApplicationReportResponseProto proto = GetApplicationReportResponseProto.getDefaultInstance();
+  GetApplicationReportResponseProto.Builder builder = null;
+  boolean viaProto = false;
+  
+  private ApplicationReport applicationReport = null;
+  
+  
+  public GetApplicationReportResponsePBImpl() {
+    builder = GetApplicationReportResponseProto.newBuilder();
+  }
+
+  public GetApplicationReportResponsePBImpl(GetApplicationReportResponseProto proto) {
+    this.proto = proto;
+    viaProto = true;
+  }
+  
+  public GetApplicationReportResponseProto getProto() {
+      mergeLocalToProto();
+    proto = viaProto ? proto : builder.build();
+    viaProto = true;
+    return proto;
+  }
+
+  private void mergeLocalToBuilder() {
+    if (this.applicationReport != null) {
+      builder.setApplicationReport(convertToProtoFormat(this.applicationReport));
+    }
+  }
+
+  private void mergeLocalToProto() {
+    if (viaProto) 
+      maybeInitBuilder();
+    mergeLocalToBuilder();
+    proto = builder.build();
+    viaProto = true;
+  }
+
+  private void maybeInitBuilder() {
+    if (viaProto || builder == null) {
+      builder = GetApplicationReportResponseProto.newBuilder(proto);
+    }
+    viaProto = false;
+  }
+    
+  
+  @Override
+  public ApplicationReport getApplicationReport() {
+    GetApplicationReportResponseProtoOrBuilder p = viaProto ? proto : builder;
+    if (this.applicationReport != null) {
+      return this.applicationReport;
+    }
+    if (!p.hasApplicationReport()) {
+      return null;
+    }
+    this.applicationReport = convertFromProtoFormat(p.getApplicationReport());
+    return this.applicationReport;
+  }
+
+  @Override
+  public void setApplicationReport(ApplicationReport applicationMaster) {
+    maybeInitBuilder();
+    if (applicationMaster == null) 
+      builder.clearApplicationReport();
+    this.applicationReport = applicationMaster;
+  }
+
+  private ApplicationReportPBImpl convertFromProtoFormat(ApplicationReportProto p) {
+    return new ApplicationReportPBImpl(p);
+  }
+
+  private ApplicationReportProto convertToProtoFormat(ApplicationReport t) {
+    return ((ApplicationReportPBImpl)t).getProto();
+  }
+
+
+
+}  

Added: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java?rev=1143250&view=auto
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java (added)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/ApplicationReport.java Wed Jul  6 04:51:46 2011
@@ -0,0 +1,58 @@
+/**
+* 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.api.records;
+
+public interface ApplicationReport {
+
+  ApplicationId getApplicationId();
+  void setApplicationId(ApplicationId applicationId);
+
+  String getUser();
+  void setUser(String user);
+
+  String getQueue();
+  void setQueue(String queue);
+
+  String getName();
+  void setName(String name);
+
+  String getHost();
+  void setHost(String host);
+
+  int getRpcPort();
+  void setRpcPort(int rpcPort);
+
+  String getClientToken();
+  void setClientToken(String clientToken);
+
+  ApplicationStatus getStatus();
+  void setStatus(ApplicationStatus status);
+
+  ApplicationState getState();
+  void setState(ApplicationState state);
+
+  Container getMasterContainer();
+  void setMasterContainer(Container masterContainer);
+
+  String getDiagnostics();
+  void setDiagnostics(String diagnostics);
+
+  String getTrackingUrl();
+  void setTrackingUrl(String url);
+}

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueInfo.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueInfo.java?rev=1143250&r1=1143249&r2=1143250&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueInfo.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/QueueInfo.java Wed Jul  6 04:51:46 2011
@@ -18,8 +18,8 @@ public interface QueueInfo {
   List<QueueInfo> getChildQueues();
   void setChildQueues(List<QueueInfo> childQueues);
   
-  List<Application> getApplications();
-  void setApplications(List<Application> applications);
+  List<ApplicationReport> getApplications();
+  void setApplications(List<ApplicationReport> applications);
   
   QueueState getQueueState();
   void setQueueState(QueueState queueState);

Added: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationReportPBImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationReportPBImpl.java?rev=1143250&view=auto
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationReportPBImpl.java (added)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/ApplicationReportPBImpl.java Wed Jul  6 04:51:46 2011
@@ -0,0 +1,338 @@
+package org.apache.hadoop.yarn.api.records.impl.pb;
+
+import org.apache.hadoop.yarn.api.records.ApplicationReport;
+import org.apache.hadoop.yarn.api.records.ApplicationId;
+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.api.records.ProtoBase;
+import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationIdProto;
+import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProtoOrBuilder;
+import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto;
+import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProtoOrBuilder;
+import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationStateProto;
+import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationStatusProto;
+import org.apache.hadoop.yarn.proto.YarnProtos.ContainerProto;
+import org.apache.hadoop.yarn.util.ProtoUtils;
+
+public class ApplicationReportPBImpl extends ProtoBase<ApplicationReportProto> 
+implements ApplicationReport {
+  ApplicationReportProto proto = ApplicationReportProto.getDefaultInstance();
+  ApplicationReportProto.Builder builder = null;
+  boolean viaProto = false;
+
+  ApplicationId applicationId;
+  ApplicationStatus status;
+  Container masterContainer = null;
+
+  public ApplicationReportPBImpl() {
+    builder = ApplicationReportProto.newBuilder();
+  }
+  
+  public ApplicationReportPBImpl(ApplicationReportProto proto) {
+    this.proto = proto;
+    viaProto = true;
+  }
+
+  @Override
+  public ApplicationId getApplicationId() {
+    if (this.applicationId != null) {
+      return this.applicationId;
+    }
+
+    ApplicationReportProtoOrBuilder p = viaProto ? proto : builder;
+    if (!p.hasApplicationId()) {
+      return null;
+    }
+    this.applicationId = convertFromProtoFormat(p.getApplicationId());
+    return this.applicationId;
+  }
+  
+  @Override
+  public Container getMasterContainer() {
+    if (this.masterContainer != null) {
+      return this.masterContainer;
+    }
+
+    ApplicationReportProtoOrBuilder p = viaProto ? proto : builder;
+    if (!p.hasMasterContainer()) {
+      return null;
+    }
+    this.masterContainer = convertFromProtoFormat(p.getMasterContainer());
+    return this.masterContainer;
+  }
+
+  @Override
+  public String getTrackingUrl() {
+    ApplicationReportProtoOrBuilder p = viaProto ? proto : builder;
+    if (!p.hasTrackingUrl()) {
+      return null;
+    }
+    return p.getTrackingUrl();
+  }
+
+  @Override
+  public String getName() {
+    ApplicationReportProtoOrBuilder p = viaProto ? proto : builder;
+    if (!p.hasName()) {
+      return null;
+    }
+    return p.getName();
+  }
+
+  @Override
+  public String getQueue() {
+    ApplicationReportProtoOrBuilder p = viaProto ? proto : builder;
+    if (!p.hasQueue()) {
+      return null;
+    }
+    return p.getQueue();
+  }
+
+  @Override
+  public ApplicationState getState() {
+    ApplicationReportProtoOrBuilder p = viaProto ? proto : builder;
+    if (!p.hasState()) {
+      return null;
+    }
+    return convertFromProtoFormat(p.getState());
+  }
+
+  @Override
+  public String getHost() {
+    ApplicationReportProtoOrBuilder p = viaProto ? proto : builder;
+    if (!p.hasHost()) {
+      return null;
+    }
+    return (p.getHost());
+  }
+
+  @Override
+  public int getRpcPort() {
+    ApplicationReportProtoOrBuilder p = viaProto ? proto : builder;
+    return (p.getRpcPort());
+  }
+
+  @Override
+  public String getClientToken() {
+    ApplicationReportProtoOrBuilder p = viaProto ? proto : builder;
+    if (!p.hasClientToken()) {
+      return null;
+    }
+    return (p.getClientToken());
+  }
+
+  @Override
+  public ApplicationStatus getStatus() {
+    if (this.status != null) {
+      return this.status;
+    }
+
+    ApplicationReportProtoOrBuilder p = viaProto ? proto : builder;
+    if (!p.hasStatus()) {
+      return null;
+    }
+    this.status = convertFromProtoFormat(p.getStatus());
+    return this.status;
+  }
+
+  @Override
+  public String getUser() {
+    ApplicationReportProtoOrBuilder p = viaProto ? proto : builder;
+    if (!p.hasUser()) {
+      return null;
+    }
+    return p.getUser();
+  }
+
+
+  @Override
+  public String getDiagnostics() {
+    ApplicationReportProtoOrBuilder p = viaProto ? proto : builder;
+    if (!p.hasDiagnostics()) {
+      return null;
+    }
+    return p.getDiagnostics();
+  }
+
+  @Override
+  public void setApplicationId(ApplicationId applicationId) {
+    maybeInitBuilder();
+    if (applicationId == null)
+      builder.clearStatus();
+    this.applicationId = applicationId;
+  }
+
+  @Override
+  public void setMasterContainer(Container container) {
+    maybeInitBuilder();
+    if (container == null)
+      builder.clearMasterContainer();
+    this.masterContainer = container;
+  }
+
+  @Override
+  public void setTrackingUrl(String url) {
+    maybeInitBuilder();
+    if (url == null) {
+      builder.clearTrackingUrl();
+      return;
+    }
+    builder.setTrackingUrl(url);
+  }
+
+  @Override
+  public void setName(String name) {
+    maybeInitBuilder();
+    if (name == null) {
+      builder.clearName();
+      return;
+    }
+    builder.setName(name);
+  }
+
+  @Override
+  public void setQueue(String queue) {
+    maybeInitBuilder();
+    if (queue == null) {
+      builder.clearQueue();
+      return;
+    }
+    builder.setQueue(queue);
+  }
+
+  @Override
+  public void setState(ApplicationState state) {
+    maybeInitBuilder();
+    if (state == null) {
+      builder.clearState();
+      return;
+    }
+    builder.setState(convertToProtoFormat(state));
+  }
+
+  @Override
+  public void setHost(String host) {
+    maybeInitBuilder();
+    if (host == null) {
+      builder.clearHost();
+      return;
+    }
+    builder.setHost((host));
+  }
+
+  @Override
+  public void setRpcPort(int rpcPort) {
+    maybeInitBuilder();
+    builder.setRpcPort((rpcPort));
+  }
+
+  @Override
+  public void setClientToken(String clientToken) {
+    maybeInitBuilder();
+    if (clientToken == null) {
+      builder.clearClientToken();
+      return;
+    }
+    builder.setClientToken((clientToken));
+  }
+
+  @Override
+  public void setStatus(ApplicationStatus status) {
+    maybeInitBuilder();
+    if (status == null)
+      builder.clearStatus();
+    this.status = status;
+  }
+
+  @Override
+  public void setUser(String user) {
+    maybeInitBuilder();
+    if (user == null) {
+      builder.clearUser();
+      return;
+    }
+    builder.setUser((user));
+  }
+
+  @Override
+  public void setDiagnostics(String diagnostics) {
+    maybeInitBuilder();
+    if (diagnostics == null) {
+      builder.clearDiagnostics();
+      return;
+    }
+    builder.setDiagnostics(diagnostics);
+  }
+
+  @Override
+  public ApplicationReportProto getProto() {
+    mergeLocalToProto();
+    proto = viaProto ? proto : builder.build();
+    viaProto = true;
+    return proto;
+  }
+
+  private void mergeLocalToBuilder() {
+    if (this.applicationId != null
+        && !((ApplicationIdPBImpl) this.applicationId).getProto().equals(
+            builder.getApplicationId())) {
+      builder.setApplicationId(convertToProtoFormat(this.applicationId));
+    }
+    if (this.status != null
+        && !((ApplicationStatusPBImpl) this.status).getProto().equals(
+            builder.getStatus())) {
+      builder.setStatus(convertToProtoFormat(this.status));
+    }
+  }
+
+  private void mergeLocalToProto() {
+    if (viaProto)
+      maybeInitBuilder();
+    mergeLocalToBuilder();
+    proto = builder.build();
+    viaProto = true;
+  }
+
+  private void maybeInitBuilder() {
+    if (viaProto || builder == null) {
+      builder = ApplicationReportProto.newBuilder(proto);
+    }
+    viaProto = false;
+  }
+
+  private ApplicationIdProto convertToProtoFormat(ApplicationId t) {
+    return ((ApplicationIdPBImpl) t).getProto();
+  }
+
+  private ApplicationStatusPBImpl convertFromProtoFormat(
+      ApplicationStatusProto p) {
+    return new ApplicationStatusPBImpl(p);
+  }
+
+  private ApplicationStatusProto convertToProtoFormat(ApplicationStatus t) {
+    return ((ApplicationStatusPBImpl) t).getProto();
+  }
+
+  private ApplicationState convertFromProtoFormat(ApplicationStateProto s) {
+    return ProtoUtils.convertFromProtoFormat(s);
+  }
+
+  private ApplicationStateProto convertToProtoFormat(ApplicationState s) {
+    return ProtoUtils.convertToProtoFormat(s);
+  }
+
+  private ApplicationIdPBImpl convertFromProtoFormat(
+      ApplicationIdProto applicationId) {
+    return new ApplicationIdPBImpl(applicationId);
+  }
+
+  private ContainerProto convertToProtoFormat(Container t) {
+    return ((ContainerPBImpl) t).getProto();
+  }
+
+  private Container convertFromProtoFormat(ContainerProto c) {
+    return new ContainerPBImpl(c);
+  }
+
+}

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/QueueInfoPBImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/QueueInfoPBImpl.java?rev=1143250&r1=1143249&r2=1143250&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/QueueInfoPBImpl.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/impl/pb/QueueInfoPBImpl.java Wed Jul  6 04:51:46 2011
@@ -4,11 +4,11 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.hadoop.yarn.api.records.Application;
+import org.apache.hadoop.yarn.api.records.ApplicationReport;
 import org.apache.hadoop.yarn.api.records.ProtoBase;
 import org.apache.hadoop.yarn.api.records.QueueInfo;
 import org.apache.hadoop.yarn.api.records.QueueState;
-import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationProto;
+import org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto;
 import org.apache.hadoop.yarn.proto.YarnProtos.QueueInfoProto;
 import org.apache.hadoop.yarn.proto.YarnProtos.QueueInfoProtoOrBuilder;
 import org.apache.hadoop.yarn.proto.YarnProtos.QueueStateProto;
@@ -21,7 +21,7 @@ public class QueueInfoPBImpl extends Pro
   QueueInfoProto.Builder builder = null;
   boolean viaProto = false;
 
-  List<Application> applicationsList;
+  List<ApplicationReport> applicationsList;
   List<QueueInfo> childQueuesList;
   
   public QueueInfoPBImpl() {
@@ -34,7 +34,7 @@ public class QueueInfoPBImpl extends Pro
   }
 
   @Override
-  public List<Application> getApplications() {
+  public List<ApplicationReport> getApplications() {
     initLocalApplicationsList();
     return this.applicationsList;
   }
@@ -79,7 +79,7 @@ public class QueueInfoPBImpl extends Pro
   }
 
   @Override
-  public void setApplications(List<Application> applications) {
+  public void setApplications(List<ApplicationReport> applications) {
     if (applications == null) {
       builder.clearApplications();
     }
@@ -144,10 +144,10 @@ public class QueueInfoPBImpl extends Pro
       return;
     }
     QueueInfoProtoOrBuilder p = viaProto ? proto : builder;
-    List<ApplicationProto> list = p.getApplicationsList();
-    applicationsList = new ArrayList<Application>();
+    List<ApplicationReportProto> list = p.getApplicationsList();
+    applicationsList = new ArrayList<ApplicationReport>();
 
-    for (ApplicationProto a : list) {
+    for (ApplicationReportProto a : list) {
       applicationsList.add(convertFromProtoFormat(a));
     }
   }
@@ -157,12 +157,12 @@ public class QueueInfoPBImpl extends Pro
     builder.clearApplications();
     if (applicationsList == null)
       return;
-    Iterable<ApplicationProto> iterable = new Iterable<ApplicationProto>() {
+    Iterable<ApplicationReportProto> iterable = new Iterable<ApplicationReportProto>() {
       @Override
-      public Iterator<ApplicationProto> iterator() {
-        return new Iterator<ApplicationProto>() {
+      public Iterator<ApplicationReportProto> iterator() {
+        return new Iterator<ApplicationReportProto>() {
   
-          Iterator<Application> iter = applicationsList.iterator();
+          Iterator<ApplicationReport> iter = applicationsList.iterator();
   
           @Override
           public boolean hasNext() {
@@ -170,7 +170,7 @@ public class QueueInfoPBImpl extends Pro
           }
   
           @Override
-          public ApplicationProto next() {
+          public ApplicationReportProto next() {
             return convertToProtoFormat(iter.next());
           }
   
@@ -258,12 +258,12 @@ public class QueueInfoPBImpl extends Pro
   }
 
 
-  private ApplicationPBImpl convertFromProtoFormat(ApplicationProto a) {
-    return new ApplicationPBImpl(a);
+  private ApplicationReportPBImpl convertFromProtoFormat(ApplicationReportProto a) {
+    return new ApplicationReportPBImpl(a);
   }
 
-  private ApplicationProto convertToProtoFormat(Application t) {
-    return ((ApplicationPBImpl)t).getProto();
+  private ApplicationReportProto convertToProtoFormat(ApplicationReport t) {
+    return ((ApplicationReportPBImpl)t).getProto();
   }
 
   private QueueInfoPBImpl convertFromProtoFormat(QueueInfoProto a) {

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/proto/client_RM_protocol.proto
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/proto/client_RM_protocol.proto?rev=1143250&r1=1143249&r2=1143250&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/proto/client_RM_protocol.proto (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/proto/client_RM_protocol.proto Wed Jul  6 04:51:46 2011
@@ -7,7 +7,7 @@ import "yarn_service_protos.proto";
 
 service ClientRMProtocolService {
   rpc getNewApplicationId (GetNewApplicationIdRequestProto) returns (GetNewApplicationIdResponseProto);
-  rpc getApplicationMaster (GetApplicationMasterRequestProto) returns (GetApplicationMasterResponseProto);
+  rpc getApplicationReport (GetApplicationReportRequestProto) returns (GetApplicationReportResponseProto);
   rpc submitApplication (SubmitApplicationRequestProto) returns (SubmitApplicationResponseProto);
   rpc finishApplication (FinishApplicationRequestProto) returns (FinishApplicationResponseProto);
   rpc getClusterMetrics (GetClusterMetricsRequestProto) returns (GetClusterMetricsResponseProto);

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/proto/yarn_protos.proto
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/proto/yarn_protos.proto?rev=1143250&r1=1143249&r2=1143250&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/proto/yarn_protos.proto (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/proto/yarn_protos.proto Wed Jul  6 04:51:46 2011
@@ -107,16 +107,19 @@ message LocalResourceProto {
   optional LocalResourceVisibilityProto visibility= 5;
 }
 
-message ApplicationProto {
+message ApplicationReportProto {
   optional ApplicationIdProto applicationId = 1;
   optional string user = 2;
   optional string queue = 3;
   optional string name = 4;
-  optional ApplicationStatusProto status = 5;
-  optional ApplicationStateProto state = 6;
-  optional ContainerProto masterContainer = 7;
-  optional string trackingUrl = 8;
-  optional string diagnostics = 9 [default = "N/A"];
+  optional string host = 5;
+  optional int32 rpc_port = 6;
+  optional string client_token = 7;
+  optional ApplicationStatusProto status = 8;
+  optional ApplicationStateProto state = 9;
+  optional ContainerProto masterContainer = 10;
+  optional string trackingUrl = 11;
+  optional string diagnostics = 12 [default = "N/A"];
 }
 
 message NodeIdProto {
@@ -186,7 +189,7 @@ message QueueInfoProto {
   optional float currentCapacity = 4;
   optional QueueStateProto state = 5;
   repeated QueueInfoProto childQueues = 6;
-  repeated ApplicationProto applications = 7;
+  repeated ApplicationReportProto applications = 7;
 }
 
 enum QueueACLProto {

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/proto/yarn_service_protos.proto
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/proto/yarn_service_protos.proto?rev=1143250&r1=1143249&r2=1143250&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/proto/yarn_service_protos.proto (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-api/src/main/proto/yarn_service_protos.proto Wed Jul  6 04:51:46 2011
@@ -47,12 +47,12 @@ message GetNewApplicationIdResponseProto
   optional ApplicationIdProto application_id = 1;
 }
 
-message GetApplicationMasterRequestProto {
+message GetApplicationReportRequestProto {
   optional ApplicationIdProto application_id = 1;
 }
 
-message GetApplicationMasterResponseProto {
-  optional ApplicationMasterProto application_master = 1;
+message GetApplicationReportResponseProto {
+  optional ApplicationReportProto application_report = 1;
 }
 
 message SubmitApplicationRequestProto {
@@ -80,7 +80,7 @@ message GetAllApplicationsRequestProto {
 }
 
 message GetAllApplicationsResponseProto {
-  repeated ApplicationProto applications = 1;
+  repeated ApplicationReportProto applications = 1;
 }
 
 message GetClusterNodesRequestProto {

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/api/impl/pb/client/ClientRMProtocolPBClientImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/api/impl/pb/client/ClientRMProtocolPBClientImpl.java?rev=1143250&r1=1143249&r2=1143250&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/api/impl/pb/client/ClientRMProtocolPBClientImpl.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/api/impl/pb/client/ClientRMProtocolPBClientImpl.java Wed Jul  6 04:51:46 2011
@@ -11,8 +11,8 @@ import org.apache.hadoop.yarn.api.protoc
 import org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationResponse;
 import org.apache.hadoop.yarn.api.protocolrecords.GetAllApplicationsRequest;
 import org.apache.hadoop.yarn.api.protocolrecords.GetAllApplicationsResponse;
-import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationMasterRequest;
-import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationMasterResponse;
+import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportRequest;
+import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportResponse;
 import org.apache.hadoop.yarn.api.protocolrecords.GetClusterMetricsRequest;
 import org.apache.hadoop.yarn.api.protocolrecords.GetClusterMetricsResponse;
 import org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodesRequest;
@@ -29,8 +29,8 @@ import org.apache.hadoop.yarn.api.protoc
 import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.FinishApplicationResponsePBImpl;
 import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetAllApplicationsRequestPBImpl;
 import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetAllApplicationsResponsePBImpl;
-import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetApplicationMasterRequestPBImpl;
-import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetApplicationMasterResponsePBImpl;
+import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetApplicationReportRequestPBImpl;
+import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetApplicationReportResponsePBImpl;
 import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetClusterMetricsRequestPBImpl;
 import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetClusterMetricsResponsePBImpl;
 import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetClusterNodesRequestPBImpl;
@@ -48,7 +48,7 @@ import org.apache.hadoop.yarn.ipc.ProtoO
 import org.apache.hadoop.yarn.proto.ClientRMProtocol.ClientRMProtocolService;
 import org.apache.hadoop.yarn.proto.YarnServiceProtos.FinishApplicationRequestProto;
 import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetAllApplicationsRequestProto;
-import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicationMasterRequestProto;
+import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicationReportRequestProto;
 import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetClusterMetricsRequestProto;
 import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetClusterNodesRequestProto;
 import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetNewApplicationIdRequestProto;
@@ -87,11 +87,11 @@ public class ClientRMProtocolPBClientImp
   }
 
   @Override
-  public GetApplicationMasterResponse getApplicationMaster(
-      GetApplicationMasterRequest request) throws YarnRemoteException {
-    GetApplicationMasterRequestProto requestProto = ((GetApplicationMasterRequestPBImpl)request).getProto();
+  public GetApplicationReportResponse getApplicationReport(
+      GetApplicationReportRequest request) throws YarnRemoteException {
+    GetApplicationReportRequestProto requestProto = ((GetApplicationReportRequestPBImpl)request).getProto();
     try {
-      return new GetApplicationMasterResponsePBImpl(proxy.getApplicationMaster(null, requestProto));
+      return new GetApplicationReportResponsePBImpl(proxy.getApplicationReport(null, requestProto));
     } catch (ServiceException e) {
       if (e.getCause() instanceof YarnRemoteException) {
         throw (YarnRemoteException)e.getCause();

Modified: hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/api/impl/pb/service/ClientRMProtocolPBServiceImpl.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/api/impl/pb/service/ClientRMProtocolPBServiceImpl.java?rev=1143250&r1=1143249&r2=1143250&view=diff
==============================================================================
--- hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/api/impl/pb/service/ClientRMProtocolPBServiceImpl.java (original)
+++ hadoop/common/branches/MR-279/mapreduce/yarn/yarn-common/src/main/java/org/apache/hadoop/yarn/api/impl/pb/service/ClientRMProtocolPBServiceImpl.java Wed Jul  6 04:51:46 2011
@@ -3,7 +3,7 @@ package org.apache.hadoop.yarn.api.impl.
 import org.apache.hadoop.yarn.api.ClientRMProtocol;
 import org.apache.hadoop.yarn.api.protocolrecords.FinishApplicationResponse;
 import org.apache.hadoop.yarn.api.protocolrecords.GetAllApplicationsResponse;
-import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationMasterResponse;
+import org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportResponse;
 import org.apache.hadoop.yarn.api.protocolrecords.GetClusterMetricsResponse;
 import org.apache.hadoop.yarn.api.protocolrecords.GetClusterNodesResponse;
 import org.apache.hadoop.yarn.api.protocolrecords.GetNewApplicationIdResponse;
@@ -14,8 +14,8 @@ import org.apache.hadoop.yarn.api.protoc
 import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.FinishApplicationResponsePBImpl;
 import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetAllApplicationsRequestPBImpl;
 import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetAllApplicationsResponsePBImpl;
-import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetApplicationMasterRequestPBImpl;
-import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetApplicationMasterResponsePBImpl;
+import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetApplicationReportRequestPBImpl;
+import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetApplicationReportResponsePBImpl;
 import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetClusterMetricsRequestPBImpl;
 import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetClusterMetricsResponsePBImpl;
 import org.apache.hadoop.yarn.api.protocolrecords.impl.pb.GetClusterNodesRequestPBImpl;
@@ -34,8 +34,8 @@ import org.apache.hadoop.yarn.proto.Yarn
 import org.apache.hadoop.yarn.proto.YarnServiceProtos.FinishApplicationResponseProto;
 import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetAllApplicationsRequestProto;
 import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetAllApplicationsResponseProto;
-import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicationMasterRequestProto;
-import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicationMasterResponseProto;
+import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicationReportRequestProto;
+import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetApplicationReportResponseProto;
 import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetClusterMetricsRequestProto;
 import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetClusterMetricsResponseProto;
 import org.apache.hadoop.yarn.proto.YarnServiceProtos.GetClusterNodesRequestProto;
@@ -73,13 +73,13 @@ public class ClientRMProtocolPBServiceIm
   }
 
   @Override
-  public GetApplicationMasterResponseProto getApplicationMaster(
-      RpcController arg0, GetApplicationMasterRequestProto proto)
+  public GetApplicationReportResponseProto getApplicationReport(
+      RpcController arg0, GetApplicationReportRequestProto proto)
       throws ServiceException {
-    GetApplicationMasterRequestPBImpl request = new GetApplicationMasterRequestPBImpl(proto);
+    GetApplicationReportRequestPBImpl request = new GetApplicationReportRequestPBImpl(proto);
     try {
-      GetApplicationMasterResponse response = real.getApplicationMaster(request);
-      return ((GetApplicationMasterResponsePBImpl)response).getProto();
+      GetApplicationReportResponse response = real.getApplicationReport(request);
+      return ((GetApplicationReportResponsePBImpl)response).getProto();
     } catch (YarnRemoteException e) {
       throw new ServiceException(e);
     }

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=1143250&r1=1143249&r2=1143250&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 Wed Jul  6 04:51:46 2011
@@ -24,7 +24,7 @@ import com.google.common.collect.Lists;
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.hadoop.yarn.api.records.Application;
+import org.apache.hadoop.yarn.api.records.ApplicationReport;
 import org.apache.hadoop.yarn.api.records.ApplicationId;
 import org.apache.hadoop.yarn.api.records.ApplicationState;
 import org.apache.hadoop.yarn.api.records.ApplicationStatus;
@@ -65,15 +65,15 @@ public class MockApps {
     }
   }
 
-  public static List<Application> genApps(int n) {
-    List<Application> list = Lists.newArrayList();
+  public static List<ApplicationReport> genApps(int n) {
+    List<ApplicationReport> list = Lists.newArrayList();
     for (int i = 0; i < n; ++i) {
       list.add(newApp(i));
     }
     return list;
   }
 
-  public static Application newApp(int i) {
+  public static ApplicationReport newApp(int i) {
     final ApplicationId id = newAppID(i);
     final ApplicationStatus status = newAppStatus();
     final ApplicationState state = newAppState();
@@ -81,7 +81,7 @@ public class MockApps {
     final String name = newAppName();
     final String queue = newQueue();
     final Container masterContainer = null;
-    return new Application() {
+    return new ApplicationReport() {
       @Override public ApplicationId getApplicationId() { return id; }
       @Override public String getUser() { return user; }
       @Override public String getName() { return name; }
@@ -142,6 +142,36 @@ public class MockApps {
         // TODO Auto-generated method stub
         
       }
+      @Override
+      public String getHost() {
+        // TODO Auto-generated method stub
+        return null;
+      }
+      @Override
+      public void setHost(String host) {
+        // TODO Auto-generated method stub
+        
+      }
+      @Override
+      public int getRpcPort() {
+        // TODO Auto-generated method stub
+        return 0;
+      }
+      @Override
+      public void setRpcPort(int rpcPort) {
+        // TODO Auto-generated method stub
+        
+      }
+      @Override
+      public String getClientToken() {
+        // TODO Auto-generated method stub
+        return null;
+      }
+      @Override
+      public void setClientToken(String clientToken) {
+        // TODO Auto-generated method stub
+        
+      }
     };
   }
 



Mime
View raw message