diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 9da6b83d573..6e432d4a7ae 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -168,6 +168,9 @@ Release 2.0.5-beta - UNRELEASED YARN-634. Modified YarnRemoteException to be not backed by PB and introduced a separate SerializedException record. (Siddharth Seth via vinodkv) + YARN-663. Changed ResourceTracker API and LocalizationProtocol API to throw + YarnRemoteException and IOException. (Xuan Gong via vinodkv) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/ResourceTracker.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/ResourceTracker.java index a45dcb399c5..51f8198f9df 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/ResourceTracker.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/ResourceTracker.java @@ -17,6 +17,8 @@ */ package org.apache.hadoop.yarn.server.api; +import java.io.IOException; + import org.apache.hadoop.yarn.exceptions.YarnRemoteException; import org.apache.hadoop.yarn.server.api.protocolrecords.NodeHeartbeatRequest; import org.apache.hadoop.yarn.server.api.protocolrecords.NodeHeartbeatResponse; @@ -25,7 +27,11 @@ import org.apache.hadoop.yarn.server.api.protocolrecords.RegisterNodeManagerResp public interface ResourceTracker { - public RegisterNodeManagerResponse registerNodeManager(RegisterNodeManagerRequest request) throws YarnRemoteException; - public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnRemoteException; + public RegisterNodeManagerResponse registerNodeManager( + RegisterNodeManagerRequest request) throws YarnRemoteException, + IOException; + + public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) + throws YarnRemoteException, IOException; } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/impl/pb/client/ResourceTrackerPBClientImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/impl/pb/client/ResourceTrackerPBClientImpl.java index 7ecfb203b18..71472410ea5 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/impl/pb/client/ResourceTrackerPBClientImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/impl/pb/client/ResourceTrackerPBClientImpl.java @@ -53,7 +53,8 @@ private ResourceTrackerPB proxy; @Override public RegisterNodeManagerResponse registerNodeManager( - RegisterNodeManagerRequest request) throws YarnRemoteException { + RegisterNodeManagerRequest request) throws YarnRemoteException, + IOException { RegisterNodeManagerRequestProto requestProto = ((RegisterNodeManagerRequestPBImpl)request).getProto(); try { return new RegisterNodeManagerResponsePBImpl(proxy.registerNodeManager(null, requestProto)); @@ -64,7 +65,7 @@ private ResourceTrackerPB proxy; @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) - throws YarnRemoteException { + throws YarnRemoteException, IOException { NodeHeartbeatRequestProto requestProto = ((NodeHeartbeatRequestPBImpl)request).getProto(); try { return new NodeHeartbeatResponsePBImpl(proxy.nodeHeartbeat(null, requestProto)); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/impl/pb/service/ResourceTrackerPBServiceImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/impl/pb/service/ResourceTrackerPBServiceImpl.java index 18c5dcb61b4..4d0d3e782cb 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/impl/pb/service/ResourceTrackerPBServiceImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/api/impl/pb/service/ResourceTrackerPBServiceImpl.java @@ -18,6 +18,8 @@ package org.apache.hadoop.yarn.server.api.impl.pb.service; +import java.io.IOException; + import org.apache.hadoop.yarn.exceptions.YarnRemoteException; import org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatRequestProto; import org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos.NodeHeartbeatResponseProto; @@ -53,6 +55,8 @@ public class ResourceTrackerPBServiceImpl implements ResourceTrackerPB { return ((RegisterNodeManagerResponsePBImpl)response).getProto(); } catch (YarnRemoteException e) { throw new ServiceException(e); + } catch (IOException e) { + throw new ServiceException(e); } } @@ -65,6 +69,8 @@ public class ResourceTrackerPBServiceImpl implements ResourceTrackerPB { return ((NodeHeartbeatResponsePBImpl)response).getProto(); } catch (YarnRemoteException e) { throw new ServiceException(e); + } catch (IOException e) { + throw new ServiceException(e); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/TestRPCFactories.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/TestRPCFactories.java index 2af86c798fe..63d74f30620 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/TestRPCFactories.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/test/java/org/apache/hadoop/yarn/TestRPCFactories.java @@ -18,6 +18,7 @@ package org.apache.hadoop.yarn; +import java.io.IOException; import java.net.InetSocketAddress; import junit.framework.Assert; @@ -102,14 +103,15 @@ public class TestRPCFactories { @Override public RegisterNodeManagerResponse registerNodeManager( - RegisterNodeManagerRequest request) throws YarnRemoteException { + RegisterNodeManagerRequest request) throws YarnRemoteException, + IOException { // TODO Auto-generated method stub return null; } @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) - throws YarnRemoteException { + throws YarnRemoteException, IOException { // TODO Auto-generated method stub return null; } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java index 284cd946005..b08890341ca 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java @@ -18,6 +18,7 @@ package org.apache.hadoop.yarn.server.nodemanager; +import java.io.IOException; import java.net.InetSocketAddress; import java.util.ArrayList; import java.util.Collections; @@ -213,7 +214,7 @@ public class NodeStatusUpdaterImpl extends AbstractService implements } @VisibleForTesting - protected void registerWithRM() throws YarnRemoteException { + protected void registerWithRM() throws YarnRemoteException, IOException { Configuration conf = getConfig(); rmConnectWaitMS = conf.getInt( diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/api/LocalizationProtocol.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/api/LocalizationProtocol.java index b5012716edb..4e7a0728459 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/api/LocalizationProtocol.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/api/LocalizationProtocol.java @@ -17,11 +17,13 @@ */ package org.apache.hadoop.yarn.server.nodemanager.api; +import java.io.IOException; + import org.apache.hadoop.yarn.exceptions.YarnRemoteException; import org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.LocalizerHeartbeatResponse; import org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.LocalizerStatus; public interface LocalizationProtocol { public LocalizerHeartbeatResponse heartbeat(LocalizerStatus status) - throws YarnRemoteException; + throws YarnRemoteException, IOException; } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/api/impl/pb/client/LocalizationProtocolPBClientImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/api/impl/pb/client/LocalizationProtocolPBClientImpl.java index aedf9c13e4d..4e13c3affec 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/api/impl/pb/client/LocalizationProtocolPBClientImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/api/impl/pb/client/LocalizationProtocolPBClientImpl.java @@ -56,7 +56,7 @@ public class LocalizationProtocolPBClientImpl implements LocalizationProtocol, @Override public LocalizerHeartbeatResponse heartbeat(LocalizerStatus status) - throws YarnRemoteException { + throws YarnRemoteException, IOException { LocalizerStatusProto statusProto = ((LocalizerStatusPBImpl)status).getProto(); try { return new LocalizerHeartbeatResponsePBImpl( diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/api/impl/pb/service/LocalizationProtocolPBServiceImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/api/impl/pb/service/LocalizationProtocolPBServiceImpl.java index 31111d30f3f..d2b4b4e3a02 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/api/impl/pb/service/LocalizationProtocolPBServiceImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/api/impl/pb/service/LocalizationProtocolPBServiceImpl.java @@ -17,6 +17,8 @@ */ package org.apache.hadoop.yarn.server.nodemanager.api.impl.pb.service; +import java.io.IOException; + import org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.impl.pb.LocalizerHeartbeatResponsePBImpl; import org.apache.hadoop.yarn.server.nodemanager.api.protocolrecords.impl.pb.LocalizerStatusPBImpl; @@ -47,6 +49,8 @@ public class LocalizationProtocolPBServiceImpl implements LocalizationProtocolPB return ((LocalizerHeartbeatResponsePBImpl)response).getProto(); } catch (YarnRemoteException e) { throw new ServiceException(e); + } catch (IOException e) { + throw new ServiceException(e); } } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/LocalRMInterface.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/LocalRMInterface.java index e5fbf3fe8c0..f68c400da29 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/LocalRMInterface.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/LocalRMInterface.java @@ -18,6 +18,8 @@ package org.apache.hadoop.yarn.server.nodemanager; +import java.io.IOException; + import org.apache.hadoop.yarn.exceptions.YarnRemoteException; import org.apache.hadoop.yarn.factories.RecordFactory; import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider; @@ -32,13 +34,16 @@ public class LocalRMInterface implements ResourceTracker { private static final RecordFactory recordFactory = RecordFactoryProvider.getRecordFactory(null); @Override - public RegisterNodeManagerResponse registerNodeManager(RegisterNodeManagerRequest request) throws YarnRemoteException { + public RegisterNodeManagerResponse registerNodeManager( + RegisterNodeManagerRequest request) throws YarnRemoteException, + IOException { RegisterNodeManagerResponse response = recordFactory.newRecordInstance(RegisterNodeManagerResponse.class); return response; } @Override - public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) throws YarnRemoteException { + public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) + throws YarnRemoteException, IOException { NodeHeartbeatResponse response = recordFactory.newRecordInstance(NodeHeartbeatResponse.class); return response; } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/MockNodeStatusUpdater.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/MockNodeStatusUpdater.java index d71334e1a17..ba18506dad5 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/MockNodeStatusUpdater.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/MockNodeStatusUpdater.java @@ -18,6 +18,8 @@ package org.apache.hadoop.yarn.server.nodemanager; +import java.io.IOException; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.yarn.event.Dispatcher; @@ -61,7 +63,8 @@ public class MockNodeStatusUpdater extends NodeStatusUpdaterImpl { @Override public RegisterNodeManagerResponse registerNodeManager( - RegisterNodeManagerRequest request) throws YarnRemoteException { + RegisterNodeManagerRequest request) throws YarnRemoteException, + IOException { RegisterNodeManagerResponse response = recordFactory .newRecordInstance(RegisterNodeManagerResponse.class); return response; @@ -69,7 +72,7 @@ public class MockNodeStatusUpdater extends NodeStatusUpdaterImpl { @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) - throws YarnRemoteException { + throws YarnRemoteException, IOException { NodeStatus nodeStatus = request.getNodeStatus(); LOG.info("Got heartbeat number " + heartBeatID); nodeStatus.setResponseId(heartBeatID++); diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java index 46546692bef..455d0b3ef96 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeManagerResync.java @@ -166,7 +166,7 @@ public class TestNodeManagerResync { } @Override - protected void registerWithRM() throws YarnRemoteException { + protected void registerWithRM() throws YarnRemoteException, IOException { super.registerWithRM(); registrationCount++; } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java index 10dd155da1a..7c0854db7c2 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/TestNodeStatusUpdater.java @@ -123,7 +123,8 @@ public class TestNodeStatusUpdater { @Override public RegisterNodeManagerResponse registerNodeManager( - RegisterNodeManagerRequest request) throws YarnRemoteException { + RegisterNodeManagerRequest request) throws YarnRemoteException, + IOException { NodeId nodeId = request.getNodeId(); Resource resource = request.getResource(); LOG.info("Registering " + nodeId.toString()); @@ -167,7 +168,7 @@ public class TestNodeStatusUpdater { @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) - throws YarnRemoteException { + throws YarnRemoteException, IOException { NodeStatus nodeStatus = request.getNodeStatus(); LOG.info("Got heartbeat number " + heartBeatID); NodeManagerMetrics mockMetrics = mock(NodeManagerMetrics.class); @@ -390,7 +391,8 @@ public class TestNodeStatusUpdater { @Override public RegisterNodeManagerResponse registerNodeManager( - RegisterNodeManagerRequest request) throws YarnRemoteException { + RegisterNodeManagerRequest request) throws YarnRemoteException, + IOException { RegisterNodeManagerResponse response = recordFactory .newRecordInstance(RegisterNodeManagerResponse.class); @@ -399,7 +401,7 @@ public class TestNodeStatusUpdater { } @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) - throws YarnRemoteException { + throws YarnRemoteException, IOException { NodeStatus nodeStatus = request.getNodeStatus(); nodeStatus.setResponseId(heartBeatID++); @@ -424,7 +426,8 @@ public class TestNodeStatusUpdater { @Override public RegisterNodeManagerResponse registerNodeManager( - RegisterNodeManagerRequest request) throws YarnRemoteException { + RegisterNodeManagerRequest request) throws YarnRemoteException, + IOException { RegisterNodeManagerResponse response = recordFactory.newRecordInstance(RegisterNodeManagerResponse.class); @@ -434,7 +437,7 @@ public class TestNodeStatusUpdater { @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) - throws YarnRemoteException { + throws YarnRemoteException, IOException { LOG.info("Got heartBeatId: [" + heartBeatID +"]"); NodeStatus nodeStatus = request.getNodeStatus(); nodeStatus.setResponseId(heartBeatID++); @@ -474,7 +477,8 @@ public class TestNodeStatusUpdater { @Override public RegisterNodeManagerResponse registerNodeManager( - RegisterNodeManagerRequest request) throws YarnRemoteException { + RegisterNodeManagerRequest request) throws YarnRemoteException, + IOException { RegisterNodeManagerResponse response = recordFactory .newRecordInstance(RegisterNodeManagerResponse.class); response.setNodeAction(registerNodeAction); @@ -483,7 +487,7 @@ public class TestNodeStatusUpdater { @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) - throws YarnRemoteException { + throws YarnRemoteException, IOException { try { if (heartBeatID == 0) { Assert.assertEquals(request.getNodeStatus().getContainersStatuses() @@ -564,7 +568,8 @@ public class TestNodeStatusUpdater { public NodeAction registerNodeAction = NodeAction.NORMAL; @Override public RegisterNodeManagerResponse registerNodeManager( - RegisterNodeManagerRequest request) throws YarnRemoteException { + RegisterNodeManagerRequest request) throws YarnRemoteException, + IOException { RegisterNodeManagerResponse response = recordFactory .newRecordInstance(RegisterNodeManagerResponse.class); @@ -574,7 +579,7 @@ public class TestNodeStatusUpdater { @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) - throws YarnRemoteException { + throws YarnRemoteException, IOException { heartBeatID++; throw RPCUtil.getRemoteException("NodeHeartbeat exception"); } diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceTrackerService.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceTrackerService.java index c4f0b4c1709..8199c5ec37e 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceTrackerService.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/ResourceTrackerService.java @@ -17,6 +17,7 @@ */ package org.apache.hadoop.yarn.server.resourcemanager; +import java.io.IOException; import java.net.InetSocketAddress; import org.apache.commons.logging.Log; @@ -161,7 +162,8 @@ public class ResourceTrackerService extends AbstractService implements @SuppressWarnings("unchecked") @Override public RegisterNodeManagerResponse registerNodeManager( - RegisterNodeManagerRequest request) throws YarnRemoteException { + RegisterNodeManagerRequest request) throws YarnRemoteException, + IOException { NodeId nodeId = request.getNodeId(); String host = nodeId.getHost(); @@ -224,7 +226,7 @@ public class ResourceTrackerService extends AbstractService implements @SuppressWarnings("unchecked") @Override public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request) - throws YarnRemoteException { + throws YarnRemoteException, IOException { NodeStatus remoteNodeStatus = request.getNodeStatus(); /** diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-tests/src/test/java/org/apache/hadoop/yarn/server/MiniYARNCluster.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-tests/src/test/java/org/apache/hadoop/yarn/server/MiniYARNCluster.java index 0487a81208b..eb5ec543dd8 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-tests/src/test/java/org/apache/hadoop/yarn/server/MiniYARNCluster.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-tests/src/test/java/org/apache/hadoop/yarn/server/MiniYARNCluster.java @@ -306,7 +306,8 @@ public class MiniYARNCluster extends CompositeService { @Override public NodeHeartbeatResponse nodeHeartbeat( - NodeHeartbeatRequest request) throws YarnRemoteException { + NodeHeartbeatRequest request) throws YarnRemoteException, + IOException { NodeHeartbeatResponse response = recordFactory.newRecordInstance( NodeHeartbeatResponse.class); try { @@ -322,7 +323,7 @@ public class MiniYARNCluster extends CompositeService { @Override public RegisterNodeManagerResponse registerNodeManager( RegisterNodeManagerRequest request) - throws YarnRemoteException { + throws YarnRemoteException, IOException { RegisterNodeManagerResponse response = recordFactory. newRecordInstance(RegisterNodeManagerResponse.class); try {