From e5ce72fb4e6b9c0ab5eca15f2ab30005e3ee1bd9 Mon Sep 17 00:00:00 2001 From: Vinod Kumar Vavilapalli Date: Wed, 8 May 2013 04:17:40 +0000 Subject: [PATCH] YARN-651. Changed PBClientImpls of ContainerManager and RMAdmin to throw IOExceptions also. Contributed by Xuan Gong. svn merge --ignore-ancestry -c 1480154 ../../trunk/ git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1480155 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../pb/client/ContainerManagerPBClientImpl.java | 7 ++++--- .../pb/client/RMAdminProtocolPBClientImpl.java | 14 ++++++++------ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 5bd6f8e65b8..e4994f8e49d 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -147,6 +147,9 @@ Release 2.0.5-beta - UNRELEASED YARN-645. Moved RMDelegationTokenSecretManager from yarn-server-common to yarn-server-resourcemanager where it really belongs. (Jian He via vinodkv) + YARN-651. Changed PBClientImpls of ContainerManager and RMAdmin to throw + IOExceptions also. (Xuan Gong via vinodkv) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/impl/pb/client/ContainerManagerPBClientImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/impl/pb/client/ContainerManagerPBClientImpl.java index 15ce6dea860..4c242d9bf74 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/impl/pb/client/ContainerManagerPBClientImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/impl/pb/client/ContainerManagerPBClientImpl.java @@ -86,7 +86,8 @@ public class ContainerManagerPBClientImpl implements ContainerManager, @Override public GetContainerStatusResponse getContainerStatus( - GetContainerStatusRequest request) throws YarnRemoteException { + GetContainerStatusRequest request) throws YarnRemoteException, + IOException { GetContainerStatusRequestProto requestProto = ((GetContainerStatusRequestPBImpl) request).getProto(); try { @@ -99,7 +100,7 @@ public class ContainerManagerPBClientImpl implements ContainerManager, @Override public StartContainerResponse startContainer(StartContainerRequest request) - throws YarnRemoteException { + throws YarnRemoteException, IOException { StartContainerRequestProto requestProto = ((StartContainerRequestPBImpl) request).getProto(); try { @@ -112,7 +113,7 @@ public class ContainerManagerPBClientImpl implements ContainerManager, @Override public StopContainerResponse stopContainer(StopContainerRequest request) - throws YarnRemoteException { + throws YarnRemoteException, IOException { StopContainerRequestProto requestProto = ((StopContainerRequestPBImpl) request).getProto(); try { diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/impl/pb/client/RMAdminProtocolPBClientImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/impl/pb/client/RMAdminProtocolPBClientImpl.java index 3a85270dc93..8d60038dbe0 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/impl/pb/client/RMAdminProtocolPBClientImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/api/impl/pb/client/RMAdminProtocolPBClientImpl.java @@ -87,7 +87,7 @@ public class RMAdminProtocolPBClientImpl implements RMAdminProtocol, Closeable { @Override public RefreshQueuesResponse refreshQueues(RefreshQueuesRequest request) - throws YarnRemoteException { + throws YarnRemoteException, IOException { RefreshQueuesRequestProto requestProto = ((RefreshQueuesRequestPBImpl)request).getProto(); try { @@ -100,7 +100,7 @@ public class RMAdminProtocolPBClientImpl implements RMAdminProtocol, Closeable { @Override public RefreshNodesResponse refreshNodes(RefreshNodesRequest request) - throws YarnRemoteException { + throws YarnRemoteException, IOException { RefreshNodesRequestProto requestProto = ((RefreshNodesRequestPBImpl)request).getProto(); try { @@ -114,7 +114,7 @@ public class RMAdminProtocolPBClientImpl implements RMAdminProtocol, Closeable { @Override public RefreshSuperUserGroupsConfigurationResponse refreshSuperUserGroupsConfiguration( RefreshSuperUserGroupsConfigurationRequest request) - throws YarnRemoteException { + throws YarnRemoteException, IOException { RefreshSuperUserGroupsConfigurationRequestProto requestProto = ((RefreshSuperUserGroupsConfigurationRequestPBImpl)request).getProto(); try { @@ -127,7 +127,8 @@ public class RMAdminProtocolPBClientImpl implements RMAdminProtocol, Closeable { @Override public RefreshUserToGroupsMappingsResponse refreshUserToGroupsMappings( - RefreshUserToGroupsMappingsRequest request) throws YarnRemoteException { + RefreshUserToGroupsMappingsRequest request) throws YarnRemoteException, + IOException { RefreshUserToGroupsMappingsRequestProto requestProto = ((RefreshUserToGroupsMappingsRequestPBImpl)request).getProto(); try { @@ -140,7 +141,7 @@ public class RMAdminProtocolPBClientImpl implements RMAdminProtocol, Closeable { @Override public RefreshAdminAclsResponse refreshAdminAcls( - RefreshAdminAclsRequest request) throws YarnRemoteException { + RefreshAdminAclsRequest request) throws YarnRemoteException, IOException { RefreshAdminAclsRequestProto requestProto = ((RefreshAdminAclsRequestPBImpl)request).getProto(); try { @@ -153,7 +154,8 @@ public class RMAdminProtocolPBClientImpl implements RMAdminProtocol, Closeable { @Override public RefreshServiceAclsResponse refreshServiceAcls( - RefreshServiceAclsRequest request) throws YarnRemoteException { + RefreshServiceAclsRequest request) throws YarnRemoteException, + IOException { RefreshServiceAclsRequestProto requestProto = ((RefreshServiceAclsRequestPBImpl)request).getProto(); try {