YARN-631. Changed ClientRMProtocol api to throw IOException and YarnRemoteException. Contributed by Xuan Gong.

MAPREDUCE-5212. Handling YarnRemoteException separately from IOException in MR App after YARN-631. Contributed by Xuan Gong.
svn merge --ignore-ancestry -c 1480494 ../../trunk/


git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1480495 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vinod Kumar Vavilapalli 2013-05-08 22:54:07 +00:00
parent c175e3f4aa
commit fc693ff519
18 changed files with 174 additions and 64 deletions

View File

@ -227,6 +227,9 @@ Release 2.0.5-beta - UNRELEASED
MAPREDUCE-5209. Fix units in a ShuffleScheduler log message. MAPREDUCE-5209. Fix units in a ShuffleScheduler log message.
(Tsuyoshi OZAWA via cdouglas) (Tsuyoshi OZAWA via cdouglas)
MAPREDUCE-5212. Handling YarnRemoteException separately from IOException in
MR App after YARN-631. (Xuan Gong via vinodkv)
Release 2.0.4-alpha - 2013-04-25 Release 2.0.4-alpha - 2013-04-25
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -137,7 +137,7 @@ public class ClientServiceDelegate {
} }
} }
private MRClientProtocol getProxy() throws YarnRemoteException { private MRClientProtocol getProxy() throws YarnRemoteException, IOException {
if (realProxy != null) { if (realProxy != null) {
return realProxy; return realProxy;
} }

View File

@ -362,7 +362,7 @@ public class TestClientServiceDelegate {
} }
private void testRMDownForJobStatusBeforeGetAMReport(Configuration conf, private void testRMDownForJobStatusBeforeGetAMReport(Configuration conf,
int noOfRetries) throws YarnRemoteException { int noOfRetries) throws YarnRemoteException, IOException {
conf.set(MRConfig.FRAMEWORK_NAME, MRConfig.YARN_FRAMEWORK_NAME); conf.set(MRConfig.FRAMEWORK_NAME, MRConfig.YARN_FRAMEWORK_NAME);
conf.setBoolean(MRJobConfig.JOB_AM_ACCESS_DISABLED, conf.setBoolean(MRJobConfig.JOB_AM_ACCESS_DISABLED,
!isAMReachableFromClient); !isAMReachableFromClient);
@ -429,7 +429,8 @@ public class TestClientServiceDelegate {
"N/A", 0.0f); "N/A", 0.0f);
} }
private ResourceMgrDelegate getRMDelegate() throws YarnRemoteException { private ResourceMgrDelegate getRMDelegate() throws YarnRemoteException,
IOException {
ResourceMgrDelegate rm = mock(ResourceMgrDelegate.class); ResourceMgrDelegate rm = mock(ResourceMgrDelegate.class);
when(rm.getApplicationReport(jobId.getAppId())).thenReturn(null); when(rm.getApplicationReport(jobId.getAppId())).thenReturn(null);
return rm; return rm;

View File

@ -40,6 +40,9 @@ Release 2.0.5-beta - UNRELEASED
YARN-632. Changed ContainerManager api to throw IOException and YARN-632. Changed ContainerManager api to throw IOException and
YarnRemoteException. (Xuan Gong via vinodkv) YarnRemoteException. (Xuan Gong via vinodkv)
YARN-631. Changed ClientRMProtocol api to throw IOException and
YarnRemoteException. (Xuan Gong via vinodkv)
NEW FEATURES NEW FEATURES
YARN-482. FS: Extend SchedulingMode to intermediate queues. YARN-482. FS: Extend SchedulingMode to intermediate queues.

View File

@ -18,6 +18,8 @@
package org.apache.hadoop.yarn.api; package org.apache.hadoop.yarn.api;
import java.io.IOException;
import org.apache.hadoop.classification.InterfaceAudience.Private; import org.apache.hadoop.classification.InterfaceAudience.Private;
import org.apache.hadoop.classification.InterfaceAudience.Public; import org.apache.hadoop.classification.InterfaceAudience.Public;
import org.apache.hadoop.classification.InterfaceStability.Stable; import org.apache.hadoop.classification.InterfaceStability.Stable;
@ -78,11 +80,12 @@ public interface ClientRMProtocol {
* @return response containing the new <code>ApplicationId</code> to be used * @return response containing the new <code>ApplicationId</code> to be used
* to submit an application * to submit an application
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
* @see #submitApplication(SubmitApplicationRequest) * @see #submitApplication(SubmitApplicationRequest)
*/ */
public GetNewApplicationResponse getNewApplication( public GetNewApplicationResponse getNewApplication(
GetNewApplicationRequest request) GetNewApplicationRequest request)
throws YarnRemoteException; throws YarnRemoteException, IOException;
/** /**
* <p>The interface used by clients to submit a new application to the * <p>The interface used by clients to submit a new application to the
@ -106,11 +109,12 @@ public interface ClientRMProtocol {
* @param request request to submit a new application * @param request request to submit a new application
* @return (empty) response on accepting the submission * @return (empty) response on accepting the submission
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
* @see #getNewApplication(GetNewApplicationRequest) * @see #getNewApplication(GetNewApplicationRequest)
*/ */
public SubmitApplicationResponse submitApplication( public SubmitApplicationResponse submitApplication(
SubmitApplicationRequest request) SubmitApplicationRequest request)
throws YarnRemoteException; throws YarnRemoteException, IOException;
/** /**
* <p>The interface used by clients to request the * <p>The interface used by clients to request the
@ -129,11 +133,12 @@ public interface ClientRMProtocol {
* @return <code>ResourceManager</code> returns an empty response * @return <code>ResourceManager</code> returns an empty response
* on success and throws an exception on rejecting the request * on success and throws an exception on rejecting the request
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
* @see #getQueueUserAcls(GetQueueUserAclsInfoRequest) * @see #getQueueUserAcls(GetQueueUserAclsInfoRequest)
*/ */
public KillApplicationResponse forceKillApplication( public KillApplicationResponse forceKillApplication(
KillApplicationRequest request) KillApplicationRequest request)
throws YarnRemoteException; throws YarnRemoteException, IOException;
/** /**
* <p>The interface used by clients to get a report of an Application from * <p>The interface used by clients to get a report of an Application from
@ -164,10 +169,11 @@ public interface ClientRMProtocol {
* @param request request for an application report * @param request request for an application report
* @return application report * @return application report
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
public GetApplicationReportResponse getApplicationReport( public GetApplicationReportResponse getApplicationReport(
GetApplicationReportRequest request) GetApplicationReportRequest request)
throws YarnRemoteException; throws YarnRemoteException, IOException;
/** /**
* <p>The interface used by clients to get metrics about the cluster from * <p>The interface used by clients to get metrics about the cluster from
@ -181,10 +187,11 @@ public interface ClientRMProtocol {
* @param request request for cluster metrics * @param request request for cluster metrics
* @return cluster metrics * @return cluster metrics
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
public GetClusterMetricsResponse getClusterMetrics( public GetClusterMetricsResponse getClusterMetrics(
GetClusterMetricsRequest request) GetClusterMetricsRequest request)
throws YarnRemoteException; throws YarnRemoteException, IOException;
/** /**
* <p>The interface used by clients to get a report of all Applications * <p>The interface used by clients to get a report of all Applications
@ -202,10 +209,11 @@ public interface ClientRMProtocol {
* @param request request for report on all running applications * @param request request for report on all running applications
* @return report on all running applications * @return report on all running applications
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
public GetAllApplicationsResponse getAllApplications( public GetAllApplicationsResponse getAllApplications(
GetAllApplicationsRequest request) GetAllApplicationsRequest request)
throws YarnRemoteException; throws YarnRemoteException, IOException;
/** /**
* <p>The interface used by clients to get a report of all nodes * <p>The interface used by clients to get a report of all nodes
@ -218,10 +226,11 @@ public interface ClientRMProtocol {
* @param request request for report on all nodes * @param request request for report on all nodes
* @return report on all nodes * @return report on all nodes
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
public GetClusterNodesResponse getClusterNodes( public GetClusterNodesResponse getClusterNodes(
GetClusterNodesRequest request) GetClusterNodesRequest request)
throws YarnRemoteException; throws YarnRemoteException, IOException;
/** /**
* <p>The interface used by clients to get information about <em>queues</em> * <p>The interface used by clients to get information about <em>queues</em>
@ -236,10 +245,11 @@ public interface ClientRMProtocol {
* @param request request to get queue information * @param request request to get queue information
* @return queue information * @return queue information
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
public GetQueueInfoResponse getQueueInfo( public GetQueueInfoResponse getQueueInfo(
GetQueueInfoRequest request) GetQueueInfoRequest request)
throws YarnRemoteException; throws YarnRemoteException, IOException;
/** /**
* <p>The interface used by clients to get information about <em>queue * <p>The interface used by clients to get information about <em>queue
@ -252,10 +262,11 @@ public interface ClientRMProtocol {
* @param request request to get queue acls for <em>current user</em> * @param request request to get queue acls for <em>current user</em>
* @return queue acls for <em>current user</em> * @return queue acls for <em>current user</em>
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
public GetQueueUserAclsInfoResponse getQueueUserAcls( public GetQueueUserAclsInfoResponse getQueueUserAcls(
GetQueueUserAclsInfoRequest request) GetQueueUserAclsInfoRequest request)
throws YarnRemoteException; throws YarnRemoteException, IOException;
/** /**
* <p>The interface used by clients to get delegation token, enabling the * <p>The interface used by clients to get delegation token, enabling the
@ -267,10 +278,11 @@ public interface ClientRMProtocol {
* @param request request to get a delegation token for the client. * @param request request to get a delegation token for the client.
* @return delegation token that can be used to talk to this service * @return delegation token that can be used to talk to this service
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
public GetDelegationTokenResponse getDelegationToken( public GetDelegationTokenResponse getDelegationToken(
GetDelegationTokenRequest request) GetDelegationTokenRequest request)
throws YarnRemoteException; throws YarnRemoteException, IOException;
/** /**
* Renew an existing delegation token. * Renew an existing delegation token.
@ -278,10 +290,12 @@ public interface ClientRMProtocol {
* @param request the delegation token to be renewed. * @param request the delegation token to be renewed.
* @return the new expiry time for the delegation token. * @return the new expiry time for the delegation token.
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
@Private @Private
public RenewDelegationTokenResponse renewDelegationToken( public RenewDelegationTokenResponse renewDelegationToken(
RenewDelegationTokenRequest request) throws YarnRemoteException; RenewDelegationTokenRequest request) throws YarnRemoteException,
IOException;
/** /**
* Cancel an existing delegation token. * Cancel an existing delegation token.
@ -289,8 +303,10 @@ public interface ClientRMProtocol {
* @param request the delegation token to be cancelled. * @param request the delegation token to be cancelled.
* @return an empty response. * @return an empty response.
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
@Private @Private
public CancelDelegationTokenResponse cancelDelegationToken( public CancelDelegationTokenResponse cancelDelegationToken(
CancelDelegationTokenRequest request) throws YarnRemoteException; CancelDelegationTokenRequest request) throws YarnRemoteException,
IOException;
} }

View File

@ -589,8 +589,10 @@ public class Client extends YarnClientImpl {
* @param appId Application Id of application to be monitored * @param appId Application Id of application to be monitored
* @return true if application completed successfully * @return true if application completed successfully
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
private boolean monitorApplication(ApplicationId appId) throws YarnRemoteException { private boolean monitorApplication(ApplicationId appId)
throws YarnRemoteException, IOException {
while (true) { while (true) {
@ -652,8 +654,10 @@ public class Client extends YarnClientImpl {
* Kill a submitted application by sending a call to the ASM * Kill a submitted application by sending a call to the ASM
* @param appId Application Id to be killed. * @param appId Application Id to be killed.
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
private void forceKillApplication(ApplicationId appId) throws YarnRemoteException { private void forceKillApplication(ApplicationId appId)
throws YarnRemoteException, IOException {
// TODO clarify whether multiple jobs with the same app id can be submitted and be running at // TODO clarify whether multiple jobs with the same app id can be submitted and be running at
// the same time. // the same time.
// If yes, can we kill a particular attempt only? // If yes, can we kill a particular attempt only?

View File

@ -357,9 +357,11 @@ public class UnmanagedAMLauncher {
* Application Id of application to be monitored * Application Id of application to be monitored
* @return true if application completed successfully * @return true if application completed successfully
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
private ApplicationReport monitorApplication(ApplicationId appId, private ApplicationReport monitorApplication(ApplicationId appId,
Set<YarnApplicationState> finalState) throws YarnRemoteException { Set<YarnApplicationState> finalState) throws YarnRemoteException,
IOException {
long foundAMCompletedTime = 0; long foundAMCompletedTime = 0;
final int timeToWaitMS = 10000; final int timeToWaitMS = 10000;

View File

@ -18,6 +18,7 @@
package org.apache.hadoop.yarn.client; package org.apache.hadoop.yarn.client;
import java.io.IOException;
import java.util.List; import java.util.List;
import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.classification.InterfaceAudience;
@ -58,8 +59,10 @@ public interface YarnClient extends Service {
* @return response containing the new <code>ApplicationId</code> to be used * @return response containing the new <code>ApplicationId</code> to be used
* to submit an application * to submit an application
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
GetNewApplicationResponse getNewApplication() throws YarnRemoteException; GetNewApplicationResponse getNewApplication() throws YarnRemoteException,
IOException;
/** /**
* <p> * <p>
@ -73,10 +76,11 @@ public interface YarnClient extends Service {
* needed to submit a new application * needed to submit a new application
* @return {@link ApplicationId} of the accepted application * @return {@link ApplicationId} of the accepted application
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
* @see #getNewApplication() * @see #getNewApplication()
*/ */
ApplicationId submitApplication(ApplicationSubmissionContext appContext) ApplicationId submitApplication(ApplicationSubmissionContext appContext)
throws YarnRemoteException; throws YarnRemoteException, IOException;
/** /**
* <p> * <p>
@ -88,9 +92,11 @@ public interface YarnClient extends Service {
* @throws YarnRemoteException * @throws YarnRemoteException
* in case of errors or if YARN rejects the request due to * in case of errors or if YARN rejects the request due to
* access-control restrictions. * access-control restrictions.
* @throws IOException
* @see #getQueueAclsInfo() * @see #getQueueAclsInfo()
*/ */
void killApplication(ApplicationId applicationId) throws YarnRemoteException; void killApplication(ApplicationId applicationId) throws YarnRemoteException,
IOException;
/** /**
* <p> * <p>
@ -120,9 +126,10 @@ public interface YarnClient extends Service {
* {@link ApplicationId} of the application that needs a report * {@link ApplicationId} of the application that needs a report
* @return application report * @return application report
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
ApplicationReport getApplicationReport(ApplicationId appId) ApplicationReport getApplicationReport(ApplicationId appId)
throws YarnRemoteException; throws YarnRemoteException, IOException;
/** /**
* <p> * <p>
@ -137,8 +144,10 @@ public interface YarnClient extends Service {
* *
* @return a list of reports of all running applications * @return a list of reports of all running applications
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
List<ApplicationReport> getApplicationList() throws YarnRemoteException; List<ApplicationReport> getApplicationList() throws YarnRemoteException,
IOException;
/** /**
* <p> * <p>
@ -147,8 +156,10 @@ public interface YarnClient extends Service {
* *
* @return cluster metrics * @return cluster metrics
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
YarnClusterMetrics getYarnClusterMetrics() throws YarnRemoteException; YarnClusterMetrics getYarnClusterMetrics() throws YarnRemoteException,
IOException;
/** /**
* <p> * <p>
@ -157,8 +168,9 @@ public interface YarnClient extends Service {
* *
* @return A list of report of all nodes * @return A list of report of all nodes
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
List<NodeReport> getNodeReports() throws YarnRemoteException; List<NodeReport> getNodeReports() throws YarnRemoteException, IOException;
/** /**
* <p> * <p>
@ -170,8 +182,10 @@ public interface YarnClient extends Service {
* @return a delegation token ({@link DelegationToken}) that can be used to * @return a delegation token ({@link DelegationToken}) that can be used to
* talk to YARN * talk to YARN
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
DelegationToken getRMDelegationToken(Text renewer) throws YarnRemoteException; DelegationToken getRMDelegationToken(Text renewer)
throws YarnRemoteException, IOException;
/** /**
* <p> * <p>
@ -184,8 +198,10 @@ public interface YarnClient extends Service {
* @throws YarnRemoteException * @throws YarnRemoteException
* in case of errors or if YARN rejects the request due to * in case of errors or if YARN rejects the request due to
* access-control restrictions. * access-control restrictions.
* @throws IOException
*/ */
QueueInfo getQueueInfo(String queueName) throws YarnRemoteException; QueueInfo getQueueInfo(String queueName) throws YarnRemoteException,
IOException;
/** /**
* <p> * <p>
@ -195,8 +211,9 @@ public interface YarnClient extends Service {
* *
* @return a list of queue-information for all queues * @return a list of queue-information for all queues
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
List<QueueInfo> getAllQueues() throws YarnRemoteException; List<QueueInfo> getAllQueues() throws YarnRemoteException, IOException;
/** /**
* <p> * <p>
@ -205,8 +222,9 @@ public interface YarnClient extends Service {
* *
* @return a list of queue-information for all the top-level queues * @return a list of queue-information for all the top-level queues
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
List<QueueInfo> getRootQueueInfos() throws YarnRemoteException; List<QueueInfo> getRootQueueInfos() throws YarnRemoteException, IOException;
/** /**
* <p> * <p>
@ -219,8 +237,10 @@ public interface YarnClient extends Service {
* @return a list of queue-information for all queues who are direct children * @return a list of queue-information for all queues who are direct children
* of the given parent queue. * of the given parent queue.
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
List<QueueInfo> getChildQueueInfos(String parent) throws YarnRemoteException; List<QueueInfo> getChildQueueInfos(String parent) throws YarnRemoteException,
IOException;
/** /**
* <p> * <p>
@ -231,6 +251,8 @@ public interface YarnClient extends Service {
* @return a list of queue acls ({@link QueueUserACLInfo}) for * @return a list of queue acls ({@link QueueUserACLInfo}) for
* <em>current user</em> * <em>current user</em>
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
List<QueueUserACLInfo> getQueueAclsInfo() throws YarnRemoteException; List<QueueUserACLInfo> getQueueAclsInfo() throws YarnRemoteException,
IOException;
} }

View File

@ -18,6 +18,7 @@
package org.apache.hadoop.yarn.client; package org.apache.hadoop.yarn.client;
import java.io.IOException;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -121,7 +122,7 @@ public class YarnClientImpl extends AbstractService implements YarnClient {
@Override @Override
public GetNewApplicationResponse getNewApplication() public GetNewApplicationResponse getNewApplication()
throws YarnRemoteException { throws YarnRemoteException, IOException {
GetNewApplicationRequest request = GetNewApplicationRequest request =
Records.newRecord(GetNewApplicationRequest.class); Records.newRecord(GetNewApplicationRequest.class);
return rmClient.getNewApplication(request); return rmClient.getNewApplication(request);
@ -130,7 +131,7 @@ public class YarnClientImpl extends AbstractService implements YarnClient {
@Override @Override
public ApplicationId public ApplicationId
submitApplication(ApplicationSubmissionContext appContext) submitApplication(ApplicationSubmissionContext appContext)
throws YarnRemoteException { throws YarnRemoteException, IOException {
ApplicationId applicationId = appContext.getApplicationId(); ApplicationId applicationId = appContext.getApplicationId();
appContext.setApplicationId(applicationId); appContext.setApplicationId(applicationId);
SubmitApplicationRequest request = SubmitApplicationRequest request =
@ -167,7 +168,7 @@ public class YarnClientImpl extends AbstractService implements YarnClient {
@Override @Override
public void killApplication(ApplicationId applicationId) public void killApplication(ApplicationId applicationId)
throws YarnRemoteException { throws YarnRemoteException, IOException {
LOG.info("Killing application " + applicationId); LOG.info("Killing application " + applicationId);
KillApplicationRequest request = KillApplicationRequest request =
Records.newRecord(KillApplicationRequest.class); Records.newRecord(KillApplicationRequest.class);
@ -177,7 +178,7 @@ public class YarnClientImpl extends AbstractService implements YarnClient {
@Override @Override
public ApplicationReport getApplicationReport(ApplicationId appId) public ApplicationReport getApplicationReport(ApplicationId appId)
throws YarnRemoteException { throws YarnRemoteException, IOException {
GetApplicationReportRequest request = GetApplicationReportRequest request =
Records.newRecord(GetApplicationReportRequest.class); Records.newRecord(GetApplicationReportRequest.class);
request.setApplicationId(appId); request.setApplicationId(appId);
@ -188,7 +189,7 @@ public class YarnClientImpl extends AbstractService implements YarnClient {
@Override @Override
public List<ApplicationReport> getApplicationList() public List<ApplicationReport> getApplicationList()
throws YarnRemoteException { throws YarnRemoteException, IOException {
GetAllApplicationsRequest request = GetAllApplicationsRequest request =
Records.newRecord(GetAllApplicationsRequest.class); Records.newRecord(GetAllApplicationsRequest.class);
GetAllApplicationsResponse response = rmClient.getAllApplications(request); GetAllApplicationsResponse response = rmClient.getAllApplications(request);
@ -196,7 +197,8 @@ public class YarnClientImpl extends AbstractService implements YarnClient {
} }
@Override @Override
public YarnClusterMetrics getYarnClusterMetrics() throws YarnRemoteException { public YarnClusterMetrics getYarnClusterMetrics() throws YarnRemoteException,
IOException {
GetClusterMetricsRequest request = GetClusterMetricsRequest request =
Records.newRecord(GetClusterMetricsRequest.class); Records.newRecord(GetClusterMetricsRequest.class);
GetClusterMetricsResponse response = rmClient.getClusterMetrics(request); GetClusterMetricsResponse response = rmClient.getClusterMetrics(request);
@ -204,7 +206,8 @@ public class YarnClientImpl extends AbstractService implements YarnClient {
} }
@Override @Override
public List<NodeReport> getNodeReports() throws YarnRemoteException { public List<NodeReport> getNodeReports() throws YarnRemoteException,
IOException {
GetClusterNodesRequest request = GetClusterNodesRequest request =
Records.newRecord(GetClusterNodesRequest.class); Records.newRecord(GetClusterNodesRequest.class);
GetClusterNodesResponse response = rmClient.getClusterNodes(request); GetClusterNodesResponse response = rmClient.getClusterNodes(request);
@ -213,7 +216,7 @@ public class YarnClientImpl extends AbstractService implements YarnClient {
@Override @Override
public DelegationToken getRMDelegationToken(Text renewer) public DelegationToken getRMDelegationToken(Text renewer)
throws YarnRemoteException { throws YarnRemoteException, IOException {
/* get the token from RM */ /* get the token from RM */
GetDelegationTokenRequest rmDTRequest = GetDelegationTokenRequest rmDTRequest =
Records.newRecord(GetDelegationTokenRequest.class); Records.newRecord(GetDelegationTokenRequest.class);
@ -236,7 +239,8 @@ public class YarnClientImpl extends AbstractService implements YarnClient {
} }
@Override @Override
public QueueInfo getQueueInfo(String queueName) throws YarnRemoteException { public QueueInfo getQueueInfo(String queueName) throws YarnRemoteException,
IOException {
GetQueueInfoRequest request = GetQueueInfoRequest request =
getQueueInfoRequest(queueName, true, false, false); getQueueInfoRequest(queueName, true, false, false);
Records.newRecord(GetQueueInfoRequest.class); Records.newRecord(GetQueueInfoRequest.class);
@ -244,14 +248,16 @@ public class YarnClientImpl extends AbstractService implements YarnClient {
} }
@Override @Override
public List<QueueUserACLInfo> getQueueAclsInfo() throws YarnRemoteException { public List<QueueUserACLInfo> getQueueAclsInfo() throws YarnRemoteException,
IOException {
GetQueueUserAclsInfoRequest request = GetQueueUserAclsInfoRequest request =
Records.newRecord(GetQueueUserAclsInfoRequest.class); Records.newRecord(GetQueueUserAclsInfoRequest.class);
return rmClient.getQueueUserAcls(request).getUserAclsInfoList(); return rmClient.getQueueUserAcls(request).getUserAclsInfoList();
} }
@Override @Override
public List<QueueInfo> getAllQueues() throws YarnRemoteException { public List<QueueInfo> getAllQueues() throws YarnRemoteException,
IOException {
List<QueueInfo> queues = new ArrayList<QueueInfo>(); List<QueueInfo> queues = new ArrayList<QueueInfo>();
QueueInfo rootQueue = QueueInfo rootQueue =
@ -262,7 +268,8 @@ public class YarnClientImpl extends AbstractService implements YarnClient {
} }
@Override @Override
public List<QueueInfo> getRootQueueInfos() throws YarnRemoteException { public List<QueueInfo> getRootQueueInfos() throws YarnRemoteException,
IOException {
List<QueueInfo> queues = new ArrayList<QueueInfo>(); List<QueueInfo> queues = new ArrayList<QueueInfo>();
QueueInfo rootQueue = QueueInfo rootQueue =
@ -274,7 +281,7 @@ public class YarnClientImpl extends AbstractService implements YarnClient {
@Override @Override
public List<QueueInfo> getChildQueueInfos(String parent) public List<QueueInfo> getChildQueueInfos(String parent)
throws YarnRemoteException { throws YarnRemoteException, IOException {
List<QueueInfo> queues = new ArrayList<QueueInfo>(); List<QueueInfo> queues = new ArrayList<QueueInfo>();
QueueInfo parentQueue = QueueInfo parentQueue =

View File

@ -91,8 +91,9 @@ public class ApplicationCLI extends YarnCLI {
* Lists all the applications present in the Resource Manager * Lists all the applications present in the Resource Manager
* *
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
private void listAllApplications() throws YarnRemoteException { private void listAllApplications() throws YarnRemoteException, IOException {
PrintWriter writer = new PrintWriter(sysout); PrintWriter writer = new PrintWriter(sysout);
List<ApplicationReport> appsReport = client.getApplicationList(); List<ApplicationReport> appsReport = client.getApplicationList();
@ -117,8 +118,10 @@ public class ApplicationCLI extends YarnCLI {
* *
* @param applicationId * @param applicationId
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
private void killApplication(String applicationId) throws YarnRemoteException { private void killApplication(String applicationId)
throws YarnRemoteException, IOException {
ApplicationId appId = ConverterUtils.toApplicationId(applicationId); ApplicationId appId = ConverterUtils.toApplicationId(applicationId);
sysout.println("Killing application " + applicationId); sysout.println("Killing application " + applicationId);
client.killApplication(appId); client.killApplication(appId);

View File

@ -84,8 +84,9 @@ public class NodeCLI extends YarnCLI {
* Lists all the nodes present in the cluster * Lists all the nodes present in the cluster
* *
* @throws YarnRemoteException * @throws YarnRemoteException
* @throws IOException
*/ */
private void listClusterNodes() throws YarnRemoteException { private void listClusterNodes() throws YarnRemoteException, IOException {
PrintWriter writer = new PrintWriter(sysout); PrintWriter writer = new PrintWriter(sysout);
List<NodeReport> nodesReport = client.getNodeReports(); List<NodeReport> nodesReport = client.getNodeReports();
writer.println("Total Nodes:" + nodesReport.size()); writer.println("Total Nodes:" + nodesReport.size());

View File

@ -23,6 +23,7 @@ import static org.mockito.Matchers.any;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.when;
import java.io.IOException;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
import java.util.TreeSet; import java.util.TreeSet;
@ -69,7 +70,7 @@ public class TestAMRMClient {
int nodeCount = 3; int nodeCount = 3;
@Before @Before
public void setup() throws YarnRemoteException { public void setup() throws YarnRemoteException, IOException {
// start minicluster // start minicluster
conf = new YarnConfiguration(); conf = new YarnConfiguration();
yarnCluster = new MiniYARNCluster(TestAMRMClient.class.getName(), nodeCount, 1, 1); yarnCluster = new MiniYARNCluster(TestAMRMClient.class.getName(), nodeCount, 1, 1);

View File

@ -23,6 +23,9 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.times; import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when; import static org.mockito.Mockito.when;
import java.io.IOException;
import junit.framework.Assert; import junit.framework.Assert;
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configuration;
@ -89,6 +92,8 @@ public class TestYarnClient {
client.submitApplication(context); client.submitApplication(context);
} catch (YarnRemoteException e) { } catch (YarnRemoteException e) {
Assert.fail("Exception is not expected."); Assert.fail("Exception is not expected.");
} catch (IOException e) {
Assert.fail("Exception is not expected.");
} }
verify(((MockYarnClient) client).mockReport,times(4 * i + 4)) verify(((MockYarnClient) client).mockReport,times(4 * i + 4))
.getYarnApplicationState(); .getYarnApplicationState();
@ -115,6 +120,8 @@ public class TestYarnClient {
GetApplicationReportRequest.class))).thenReturn(mockResponse); GetApplicationReportRequest.class))).thenReturn(mockResponse);
} catch (YarnRemoteException e) { } catch (YarnRemoteException e) {
Assert.fail("Exception is not expected."); Assert.fail("Exception is not expected.");
} catch (IOException e) {
Assert.fail("Exception is not expected.");
} }
when(mockResponse.getApplicationReport()).thenReturn(mockReport); when(mockResponse.getApplicationReport()).thenReturn(mockReport);
} }

View File

@ -113,7 +113,7 @@ public class ClientRMProtocolPBClientImpl implements ClientRMProtocol,
@Override @Override
public KillApplicationResponse forceKillApplication( public KillApplicationResponse forceKillApplication(
KillApplicationRequest request) throws YarnRemoteException { KillApplicationRequest request) throws YarnRemoteException, IOException {
KillApplicationRequestProto requestProto = KillApplicationRequestProto requestProto =
((KillApplicationRequestPBImpl) request).getProto(); ((KillApplicationRequestPBImpl) request).getProto();
try { try {
@ -126,7 +126,8 @@ public class ClientRMProtocolPBClientImpl implements ClientRMProtocol,
@Override @Override
public GetApplicationReportResponse getApplicationReport( public GetApplicationReportResponse getApplicationReport(
GetApplicationReportRequest request) throws YarnRemoteException { GetApplicationReportRequest request) throws YarnRemoteException,
IOException {
GetApplicationReportRequestProto requestProto = GetApplicationReportRequestProto requestProto =
((GetApplicationReportRequestPBImpl) request).getProto(); ((GetApplicationReportRequestPBImpl) request).getProto();
try { try {
@ -139,7 +140,8 @@ public class ClientRMProtocolPBClientImpl implements ClientRMProtocol,
@Override @Override
public GetClusterMetricsResponse getClusterMetrics( public GetClusterMetricsResponse getClusterMetrics(
GetClusterMetricsRequest request) throws YarnRemoteException { GetClusterMetricsRequest request) throws YarnRemoteException,
IOException {
GetClusterMetricsRequestProto requestProto = GetClusterMetricsRequestProto requestProto =
((GetClusterMetricsRequestPBImpl) request).getProto(); ((GetClusterMetricsRequestPBImpl) request).getProto();
try { try {
@ -152,7 +154,8 @@ public class ClientRMProtocolPBClientImpl implements ClientRMProtocol,
@Override @Override
public GetNewApplicationResponse getNewApplication( public GetNewApplicationResponse getNewApplication(
GetNewApplicationRequest request) throws YarnRemoteException { GetNewApplicationRequest request) throws YarnRemoteException,
IOException {
GetNewApplicationRequestProto requestProto = GetNewApplicationRequestProto requestProto =
((GetNewApplicationRequestPBImpl) request).getProto(); ((GetNewApplicationRequestPBImpl) request).getProto();
try { try {
@ -165,7 +168,8 @@ public class ClientRMProtocolPBClientImpl implements ClientRMProtocol,
@Override @Override
public SubmitApplicationResponse submitApplication( public SubmitApplicationResponse submitApplication(
SubmitApplicationRequest request) throws YarnRemoteException { SubmitApplicationRequest request) throws YarnRemoteException,
IOException {
SubmitApplicationRequestProto requestProto = SubmitApplicationRequestProto requestProto =
((SubmitApplicationRequestPBImpl) request).getProto(); ((SubmitApplicationRequestPBImpl) request).getProto();
try { try {
@ -178,7 +182,8 @@ public class ClientRMProtocolPBClientImpl implements ClientRMProtocol,
@Override @Override
public GetAllApplicationsResponse getAllApplications( public GetAllApplicationsResponse getAllApplications(
GetAllApplicationsRequest request) throws YarnRemoteException { GetAllApplicationsRequest request) throws YarnRemoteException,
IOException {
GetAllApplicationsRequestProto requestProto = GetAllApplicationsRequestProto requestProto =
((GetAllApplicationsRequestPBImpl) request).getProto(); ((GetAllApplicationsRequestPBImpl) request).getProto();
try { try {
@ -192,7 +197,7 @@ public class ClientRMProtocolPBClientImpl implements ClientRMProtocol,
@Override @Override
public GetClusterNodesResponse public GetClusterNodesResponse
getClusterNodes(GetClusterNodesRequest request) getClusterNodes(GetClusterNodesRequest request)
throws YarnRemoteException { throws YarnRemoteException, IOException {
GetClusterNodesRequestProto requestProto = GetClusterNodesRequestProto requestProto =
((GetClusterNodesRequestPBImpl) request).getProto(); ((GetClusterNodesRequestPBImpl) request).getProto();
try { try {
@ -205,7 +210,7 @@ public class ClientRMProtocolPBClientImpl implements ClientRMProtocol,
@Override @Override
public GetQueueInfoResponse getQueueInfo(GetQueueInfoRequest request) public GetQueueInfoResponse getQueueInfo(GetQueueInfoRequest request)
throws YarnRemoteException { throws YarnRemoteException, IOException {
GetQueueInfoRequestProto requestProto = GetQueueInfoRequestProto requestProto =
((GetQueueInfoRequestPBImpl) request).getProto(); ((GetQueueInfoRequestPBImpl) request).getProto();
try { try {
@ -218,7 +223,8 @@ public class ClientRMProtocolPBClientImpl implements ClientRMProtocol,
@Override @Override
public GetQueueUserAclsInfoResponse getQueueUserAcls( public GetQueueUserAclsInfoResponse getQueueUserAcls(
GetQueueUserAclsInfoRequest request) throws YarnRemoteException { GetQueueUserAclsInfoRequest request) throws YarnRemoteException,
IOException {
GetQueueUserAclsInfoRequestProto requestProto = GetQueueUserAclsInfoRequestProto requestProto =
((GetQueueUserAclsInfoRequestPBImpl) request).getProto(); ((GetQueueUserAclsInfoRequestPBImpl) request).getProto();
try { try {
@ -231,7 +237,8 @@ public class ClientRMProtocolPBClientImpl implements ClientRMProtocol,
@Override @Override
public GetDelegationTokenResponse getDelegationToken( public GetDelegationTokenResponse getDelegationToken(
GetDelegationTokenRequest request) throws YarnRemoteException { GetDelegationTokenRequest request) throws YarnRemoteException,
IOException {
GetDelegationTokenRequestProto requestProto = GetDelegationTokenRequestProto requestProto =
((GetDelegationTokenRequestPBImpl) request).getProto(); ((GetDelegationTokenRequestPBImpl) request).getProto();
try { try {
@ -244,7 +251,8 @@ public class ClientRMProtocolPBClientImpl implements ClientRMProtocol,
@Override @Override
public RenewDelegationTokenResponse renewDelegationToken( public RenewDelegationTokenResponse renewDelegationToken(
RenewDelegationTokenRequest request) throws YarnRemoteException { RenewDelegationTokenRequest request) throws YarnRemoteException,
IOException {
RenewDelegationTokenRequestProto requestProto = RenewDelegationTokenRequestProto requestProto =
((RenewDelegationTokenRequestPBImpl) request).getProto(); ((RenewDelegationTokenRequestPBImpl) request).getProto();
try { try {
@ -257,7 +265,8 @@ public class ClientRMProtocolPBClientImpl implements ClientRMProtocol,
@Override @Override
public CancelDelegationTokenResponse cancelDelegationToken( public CancelDelegationTokenResponse cancelDelegationToken(
CancelDelegationTokenRequest request) throws YarnRemoteException { CancelDelegationTokenRequest request) throws YarnRemoteException,
IOException {
CancelDelegationTokenRequestProto requestProto = CancelDelegationTokenRequestProto requestProto =
((CancelDelegationTokenRequestPBImpl) request).getProto(); ((CancelDelegationTokenRequestPBImpl) request).getProto();
try { try {

View File

@ -18,6 +18,8 @@
package org.apache.hadoop.yarn.api.impl.pb.service; package org.apache.hadoop.yarn.api.impl.pb.service;
import java.io.IOException;
import org.apache.hadoop.security.proto.SecurityProtos.CancelDelegationTokenRequestProto; import org.apache.hadoop.security.proto.SecurityProtos.CancelDelegationTokenRequestProto;
import org.apache.hadoop.security.proto.SecurityProtos.CancelDelegationTokenResponseProto; import org.apache.hadoop.security.proto.SecurityProtos.CancelDelegationTokenResponseProto;
import org.apache.hadoop.security.proto.SecurityProtos.GetDelegationTokenRequestProto; import org.apache.hadoop.security.proto.SecurityProtos.GetDelegationTokenRequestProto;
@ -102,6 +104,8 @@ public class ClientRMProtocolPBServiceImpl implements ClientRMProtocolPB {
return ((KillApplicationResponsePBImpl)response).getProto(); return ((KillApplicationResponsePBImpl)response).getProto();
} catch (YarnRemoteException e) { } catch (YarnRemoteException e) {
throw new ServiceException(e); throw new ServiceException(e);
} catch (IOException e) {
throw new ServiceException(e);
} }
} }
@ -115,6 +119,8 @@ public class ClientRMProtocolPBServiceImpl implements ClientRMProtocolPB {
return ((GetApplicationReportResponsePBImpl)response).getProto(); return ((GetApplicationReportResponsePBImpl)response).getProto();
} catch (YarnRemoteException e) { } catch (YarnRemoteException e) {
throw new ServiceException(e); throw new ServiceException(e);
} catch (IOException e) {
throw new ServiceException(e);
} }
} }
@ -127,6 +133,8 @@ public class ClientRMProtocolPBServiceImpl implements ClientRMProtocolPB {
return ((GetClusterMetricsResponsePBImpl)response).getProto(); return ((GetClusterMetricsResponsePBImpl)response).getProto();
} catch (YarnRemoteException e) { } catch (YarnRemoteException e) {
throw new ServiceException(e); throw new ServiceException(e);
} catch (IOException e) {
throw new ServiceException(e);
} }
} }
@ -140,6 +148,8 @@ public class ClientRMProtocolPBServiceImpl implements ClientRMProtocolPB {
return ((GetNewApplicationResponsePBImpl)response).getProto(); return ((GetNewApplicationResponsePBImpl)response).getProto();
} catch (YarnRemoteException e) { } catch (YarnRemoteException e) {
throw new ServiceException(e); throw new ServiceException(e);
} catch (IOException e) {
throw new ServiceException(e);
} }
} }
@ -152,6 +162,8 @@ public class ClientRMProtocolPBServiceImpl implements ClientRMProtocolPB {
return ((SubmitApplicationResponsePBImpl)response).getProto(); return ((SubmitApplicationResponsePBImpl)response).getProto();
} catch (YarnRemoteException e) { } catch (YarnRemoteException e) {
throw new ServiceException(e); throw new ServiceException(e);
} catch (IOException e) {
throw new ServiceException(e);
} }
} }
@ -166,6 +178,8 @@ public class ClientRMProtocolPBServiceImpl implements ClientRMProtocolPB {
return ((GetAllApplicationsResponsePBImpl)response).getProto(); return ((GetAllApplicationsResponsePBImpl)response).getProto();
} catch (YarnRemoteException e) { } catch (YarnRemoteException e) {
throw new ServiceException(e); throw new ServiceException(e);
} catch (IOException e) {
throw new ServiceException(e);
} }
} }
@ -179,6 +193,8 @@ public class ClientRMProtocolPBServiceImpl implements ClientRMProtocolPB {
return ((GetClusterNodesResponsePBImpl)response).getProto(); return ((GetClusterNodesResponsePBImpl)response).getProto();
} catch (YarnRemoteException e) { } catch (YarnRemoteException e) {
throw new ServiceException(e); throw new ServiceException(e);
} catch (IOException e) {
throw new ServiceException(e);
} }
} }
@ -192,6 +208,8 @@ public class ClientRMProtocolPBServiceImpl implements ClientRMProtocolPB {
return ((GetQueueInfoResponsePBImpl)response).getProto(); return ((GetQueueInfoResponsePBImpl)response).getProto();
} catch (YarnRemoteException e) { } catch (YarnRemoteException e) {
throw new ServiceException(e); throw new ServiceException(e);
} catch (IOException e) {
throw new ServiceException(e);
} }
} }
@ -206,6 +224,8 @@ public class ClientRMProtocolPBServiceImpl implements ClientRMProtocolPB {
return ((GetQueueUserAclsInfoResponsePBImpl)response).getProto(); return ((GetQueueUserAclsInfoResponsePBImpl)response).getProto();
} catch (YarnRemoteException e) { } catch (YarnRemoteException e) {
throw new ServiceException(e); throw new ServiceException(e);
} catch (IOException e) {
throw new ServiceException(e);
} }
} }
@ -220,6 +240,8 @@ public class ClientRMProtocolPBServiceImpl implements ClientRMProtocolPB {
return ((GetDelegationTokenResponsePBImpl)response).getProto(); return ((GetDelegationTokenResponsePBImpl)response).getProto();
} catch (YarnRemoteException e) { } catch (YarnRemoteException e) {
throw new ServiceException(e); throw new ServiceException(e);
} catch (IOException e) {
throw new ServiceException(e);
} }
} }
@ -234,6 +256,8 @@ public class ClientRMProtocolPBServiceImpl implements ClientRMProtocolPB {
return ((RenewDelegationTokenResponsePBImpl)response).getProto(); return ((RenewDelegationTokenResponsePBImpl)response).getProto();
} catch (YarnRemoteException e) { } catch (YarnRemoteException e) {
throw new ServiceException(e); throw new ServiceException(e);
} catch (IOException e) {
throw new ServiceException(e);
} }
} }
@ -248,6 +272,8 @@ public class ClientRMProtocolPBServiceImpl implements ClientRMProtocolPB {
return ((CancelDelegationTokenResponsePBImpl)response).getProto(); return ((CancelDelegationTokenResponsePBImpl)response).getProto();
} catch (YarnRemoteException e) { } catch (YarnRemoteException e) {
throw new ServiceException(e); throw new ServiceException(e);
} catch (IOException e) {
throw new ServiceException(e);
} }
} }
} }

View File

@ -18,6 +18,7 @@
package org.apache.hadoop.yarn.server.resourcemanager; package org.apache.hadoop.yarn.server.resourcemanager;
import java.io.IOException;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.security.PrivilegedAction; import java.security.PrivilegedAction;
import java.util.Map; import java.util.Map;
@ -199,6 +200,8 @@ public class MockRM extends ResourceManager {
return client.submitApplication(req); return client.submitApplication(req);
} catch (YarnRemoteException e) { } catch (YarnRemoteException e) {
e.printStackTrace(); e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} }
return null; return null;
} }

View File

@ -339,7 +339,7 @@ public class TestClientRMTokens {
DelegationToken token = loggedInUser DelegationToken token = loggedInUser
.doAs(new PrivilegedExceptionAction<DelegationToken>() { .doAs(new PrivilegedExceptionAction<DelegationToken>() {
@Override @Override
public DelegationToken run() throws YarnRemoteException { public DelegationToken run() throws YarnRemoteException, IOException {
GetDelegationTokenRequest request = Records GetDelegationTokenRequest request = Records
.newRecord(GetDelegationTokenRequest.class); .newRecord(GetDelegationTokenRequest.class);
request.setRenewer(renewerString); request.setRenewer(renewerString);
@ -355,7 +355,7 @@ public class TestClientRMTokens {
throws IOException, InterruptedException { throws IOException, InterruptedException {
long nextExpTime = loggedInUser.doAs(new PrivilegedExceptionAction<Long>() { long nextExpTime = loggedInUser.doAs(new PrivilegedExceptionAction<Long>() {
@Override @Override
public Long run() throws YarnRemoteException { public Long run() throws YarnRemoteException, IOException {
RenewDelegationTokenRequest request = Records RenewDelegationTokenRequest request = Records
.newRecord(RenewDelegationTokenRequest.class); .newRecord(RenewDelegationTokenRequest.class);
request.setDelegationToken(dToken); request.setDelegationToken(dToken);
@ -371,7 +371,7 @@ public class TestClientRMTokens {
throws IOException, InterruptedException { throws IOException, InterruptedException {
loggedInUser.doAs(new PrivilegedExceptionAction<Void>() { loggedInUser.doAs(new PrivilegedExceptionAction<Void>() {
@Override @Override
public Void run() throws YarnRemoteException { public Void run() throws YarnRemoteException, IOException {
CancelDelegationTokenRequest request = Records CancelDelegationTokenRequest request = Records
.newRecord(CancelDelegationTokenRequest.class); .newRecord(CancelDelegationTokenRequest.class);
request.setDelegationToken(dToken); request.setDelegationToken(dToken);

View File

@ -18,6 +18,7 @@
package org.apache.hadoop.yarn.server.webproxy; package org.apache.hadoop.yarn.server.webproxy;
import java.io.IOException;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
@ -78,9 +79,10 @@ public class AppReportFetcher {
* @param appId the id of the application to get. * @param appId the id of the application to get.
* @return the ApplicationReport for that app. * @return the ApplicationReport for that app.
* @throws YarnRemoteException on any error. * @throws YarnRemoteException on any error.
* @throws IOException
*/ */
public ApplicationReport getApplicationReport(ApplicationId appId) public ApplicationReport getApplicationReport(ApplicationId appId)
throws YarnRemoteException { throws YarnRemoteException, IOException {
GetApplicationReportRequest request = recordFactory GetApplicationReportRequest request = recordFactory
.newRecordInstance(GetApplicationReportRequest.class); .newRecordInstance(GetApplicationReportRequest.class);
request.setApplicationId(appId); request.setApplicationId(appId);