|
@@ -123,7 +123,8 @@ public class TestNodeStatusUpdater {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public RegisterNodeManagerResponse registerNodeManager(
|
|
public RegisterNodeManagerResponse registerNodeManager(
|
|
- RegisterNodeManagerRequest request) throws YarnRemoteException {
|
|
|
|
|
|
+ RegisterNodeManagerRequest request) throws YarnRemoteException,
|
|
|
|
+ IOException {
|
|
NodeId nodeId = request.getNodeId();
|
|
NodeId nodeId = request.getNodeId();
|
|
Resource resource = request.getResource();
|
|
Resource resource = request.getResource();
|
|
LOG.info("Registering " + nodeId.toString());
|
|
LOG.info("Registering " + nodeId.toString());
|
|
@@ -167,7 +168,7 @@ public class TestNodeStatusUpdater {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request)
|
|
public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request)
|
|
- throws YarnRemoteException {
|
|
|
|
|
|
+ throws YarnRemoteException, IOException {
|
|
NodeStatus nodeStatus = request.getNodeStatus();
|
|
NodeStatus nodeStatus = request.getNodeStatus();
|
|
LOG.info("Got heartbeat number " + heartBeatID);
|
|
LOG.info("Got heartbeat number " + heartBeatID);
|
|
NodeManagerMetrics mockMetrics = mock(NodeManagerMetrics.class);
|
|
NodeManagerMetrics mockMetrics = mock(NodeManagerMetrics.class);
|
|
@@ -390,7 +391,8 @@ public class TestNodeStatusUpdater {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public RegisterNodeManagerResponse registerNodeManager(
|
|
public RegisterNodeManagerResponse registerNodeManager(
|
|
- RegisterNodeManagerRequest request) throws YarnRemoteException {
|
|
|
|
|
|
+ RegisterNodeManagerRequest request) throws YarnRemoteException,
|
|
|
|
+ IOException {
|
|
|
|
|
|
RegisterNodeManagerResponse response = recordFactory
|
|
RegisterNodeManagerResponse response = recordFactory
|
|
.newRecordInstance(RegisterNodeManagerResponse.class);
|
|
.newRecordInstance(RegisterNodeManagerResponse.class);
|
|
@@ -399,7 +401,7 @@ public class TestNodeStatusUpdater {
|
|
}
|
|
}
|
|
@Override
|
|
@Override
|
|
public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request)
|
|
public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request)
|
|
- throws YarnRemoteException {
|
|
|
|
|
|
+ throws YarnRemoteException, IOException {
|
|
NodeStatus nodeStatus = request.getNodeStatus();
|
|
NodeStatus nodeStatus = request.getNodeStatus();
|
|
nodeStatus.setResponseId(heartBeatID++);
|
|
nodeStatus.setResponseId(heartBeatID++);
|
|
|
|
|
|
@@ -424,7 +426,8 @@ public class TestNodeStatusUpdater {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public RegisterNodeManagerResponse registerNodeManager(
|
|
public RegisterNodeManagerResponse registerNodeManager(
|
|
- RegisterNodeManagerRequest request) throws YarnRemoteException {
|
|
|
|
|
|
+ RegisterNodeManagerRequest request) throws YarnRemoteException,
|
|
|
|
+ IOException {
|
|
|
|
|
|
RegisterNodeManagerResponse response =
|
|
RegisterNodeManagerResponse response =
|
|
recordFactory.newRecordInstance(RegisterNodeManagerResponse.class);
|
|
recordFactory.newRecordInstance(RegisterNodeManagerResponse.class);
|
|
@@ -434,7 +437,7 @@ public class TestNodeStatusUpdater {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request)
|
|
public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request)
|
|
- throws YarnRemoteException {
|
|
|
|
|
|
+ throws YarnRemoteException, IOException {
|
|
LOG.info("Got heartBeatId: [" + heartBeatID +"]");
|
|
LOG.info("Got heartBeatId: [" + heartBeatID +"]");
|
|
NodeStatus nodeStatus = request.getNodeStatus();
|
|
NodeStatus nodeStatus = request.getNodeStatus();
|
|
nodeStatus.setResponseId(heartBeatID++);
|
|
nodeStatus.setResponseId(heartBeatID++);
|
|
@@ -474,7 +477,8 @@ public class TestNodeStatusUpdater {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public RegisterNodeManagerResponse registerNodeManager(
|
|
public RegisterNodeManagerResponse registerNodeManager(
|
|
- RegisterNodeManagerRequest request) throws YarnRemoteException {
|
|
|
|
|
|
+ RegisterNodeManagerRequest request) throws YarnRemoteException,
|
|
|
|
+ IOException {
|
|
RegisterNodeManagerResponse response = recordFactory
|
|
RegisterNodeManagerResponse response = recordFactory
|
|
.newRecordInstance(RegisterNodeManagerResponse.class);
|
|
.newRecordInstance(RegisterNodeManagerResponse.class);
|
|
response.setNodeAction(registerNodeAction);
|
|
response.setNodeAction(registerNodeAction);
|
|
@@ -483,7 +487,7 @@ public class TestNodeStatusUpdater {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request)
|
|
public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request)
|
|
- throws YarnRemoteException {
|
|
|
|
|
|
+ throws YarnRemoteException, IOException {
|
|
try {
|
|
try {
|
|
if (heartBeatID == 0) {
|
|
if (heartBeatID == 0) {
|
|
Assert.assertEquals(request.getNodeStatus().getContainersStatuses()
|
|
Assert.assertEquals(request.getNodeStatus().getContainersStatuses()
|
|
@@ -564,7 +568,8 @@ public class TestNodeStatusUpdater {
|
|
public NodeAction registerNodeAction = NodeAction.NORMAL;
|
|
public NodeAction registerNodeAction = NodeAction.NORMAL;
|
|
@Override
|
|
@Override
|
|
public RegisterNodeManagerResponse registerNodeManager(
|
|
public RegisterNodeManagerResponse registerNodeManager(
|
|
- RegisterNodeManagerRequest request) throws YarnRemoteException {
|
|
|
|
|
|
+ RegisterNodeManagerRequest request) throws YarnRemoteException,
|
|
|
|
+ IOException {
|
|
|
|
|
|
RegisterNodeManagerResponse response = recordFactory
|
|
RegisterNodeManagerResponse response = recordFactory
|
|
.newRecordInstance(RegisterNodeManagerResponse.class);
|
|
.newRecordInstance(RegisterNodeManagerResponse.class);
|
|
@@ -574,7 +579,7 @@ public class TestNodeStatusUpdater {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request)
|
|
public NodeHeartbeatResponse nodeHeartbeat(NodeHeartbeatRequest request)
|
|
- throws YarnRemoteException {
|
|
|
|
|
|
+ throws YarnRemoteException, IOException {
|
|
heartBeatID++;
|
|
heartBeatID++;
|
|
throw RPCUtil.getRemoteException("NodeHeartbeat exception");
|
|
throw RPCUtil.getRemoteException("NodeHeartbeat exception");
|
|
}
|
|
}
|