tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bi...@apache.org
Subject git commit: TEZ-888. TestAMNodeMap.testNodeSelfBlacklist failing intermittently (bikas)
Date Tue, 25 Feb 2014 21:16:54 GMT
Repository: incubator-tez
Updated Branches:
  refs/heads/master f38b33090 -> dcf2b0767


TEZ-888. TestAMNodeMap.testNodeSelfBlacklist failing intermittently (bikas)


Project: http://git-wip-us.apache.org/repos/asf/incubator-tez/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tez/commit/dcf2b076
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tez/tree/dcf2b076
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tez/diff/dcf2b076

Branch: refs/heads/master
Commit: dcf2b076713c01e2f63004fbc9bf1b7a0403d5c9
Parents: f38b330
Author: Bikas Saha <bikas@apache.org>
Authored: Tue Feb 25 13:16:48 2014 -0800
Committer: Bikas Saha <bikas@apache.org>
Committed: Tue Feb 25 13:16:48 2014 -0800

----------------------------------------------------------------------
 .../apache/tez/dag/app/rm/node/AMNodeImpl.java  |  2 +-
 .../tez/dag/app/rm/node/TestAMNodeMap.java      | 21 ++++++++++----------
 2 files changed, 12 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/dcf2b076/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeImpl.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeImpl.java b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeImpl.java
index 65c4b2b..e7a5563 100644
--- a/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeImpl.java
+++ b/tez-dag/src/main/java/org/apache/tez/dag/app/rm/node/AMNodeImpl.java
@@ -251,9 +251,9 @@ public class AMNodeImpl implements AMNode {
     // these containers are not useful anymore
     pastContainers.addAll(containers);
     containers.clear();
+    sendEvent(new AMSchedulerEventNodeBlacklistUpdate(getNodeId(), true));
     sendEvent(new AMNodeEvent(getNodeId(),
         AMNodeEventType.N_NODE_WAS_BLACKLISTED));
-    sendEvent(new AMSchedulerEventNodeBlacklistUpdate(getNodeId(), true));
   }
 
   @SuppressWarnings("unchecked")

http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/dcf2b076/tez-dag/src/test/java/org/apache/tez/dag/app/rm/node/TestAMNodeMap.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/node/TestAMNodeMap.java b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/node/TestAMNodeMap.java
index a5b6e58..b9d9140 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/node/TestAMNodeMap.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/node/TestAMNodeMap.java
@@ -172,10 +172,10 @@ public class TestAMNodeMap {
     assertEquals(cId2, ((AMContainerEventNodeFailed)handler.events.get(1)).getContainerId());
     assertEquals(AMContainerEventType.C_NODE_FAILED, handler.events.get(2).getType());
     assertEquals(cId3, ((AMContainerEventNodeFailed)handler.events.get(2)).getContainerId());
-    assertEquals(AMNodeEventType.N_NODE_WAS_BLACKLISTED, handler.events.get(3).getType());
-    assertEquals(node.getNodeId(), ((AMNodeEvent)handler.events.get(3)).getNodeId());
-    assertEquals(AMSchedulerEventType.S_NODE_BLACKLISTED, handler.events.get(4).getType());
-    assertEquals(node.getNodeId(), ((AMSchedulerEventNodeBlacklistUpdate)handler.events.get(4)).getNodeId());
+    assertEquals(AMSchedulerEventType.S_NODE_BLACKLISTED, handler.events.get(3).getType());
+    assertEquals(node.getNodeId(), ((AMSchedulerEventNodeBlacklistUpdate)handler.events.get(3)).getNodeId());
+    assertEquals(AMNodeEventType.N_NODE_WAS_BLACKLISTED, handler.events.get(4).getType());
+    assertEquals(node.getNodeId(), ((AMNodeEvent)handler.events.get(4)).getNodeId());
     
     ContainerId cId4 = mock(ContainerId.class);
     ContainerId cId5 = mock(ContainerId.class);
@@ -197,10 +197,11 @@ public class TestAMNodeMap {
     AMNodeImpl node3 = (AMNodeImpl)amNodeMap.get(nodeId3);
     assertEquals(AMNodeState.FORCED_ACTIVE, node3.getState());
     assertEquals(10, handler.events.size());
+    
     assertEquals(AMContainerEventType.C_NODE_FAILED, handler.events.get(0).getType());
     assertEquals(AMContainerEventType.C_NODE_FAILED, handler.events.get(1).getType());
-    assertEquals(AMNodeEventType.N_NODE_WAS_BLACKLISTED, handler.events.get(2).getType());
-    assertEquals(AMSchedulerEventType.S_NODE_BLACKLISTED, handler.events.get(3).getType());
+    assertEquals(AMSchedulerEventType.S_NODE_BLACKLISTED, handler.events.get(2).getType());
+    assertEquals(AMNodeEventType.N_NODE_WAS_BLACKLISTED, handler.events.get(3).getType());
     assertEquals(AMNodeEventType.N_IGNORE_BLACKLISTING_ENABLED, handler.events.get(4).getType());
     assertEquals(AMNodeEventType.N_IGNORE_BLACKLISTING_ENABLED, handler.events.get(5).getType());
     assertEquals(AMNodeEventType.N_IGNORE_BLACKLISTING_ENABLED, handler.events.get(6).getType());
@@ -219,10 +220,10 @@ public class TestAMNodeMap {
     assertEquals(AMNodeEventType.N_IGNORE_BLACKLISTING_DISABLED, handler.events.get(1).getType());
     assertEquals(AMNodeEventType.N_IGNORE_BLACKLISTING_DISABLED, handler.events.get(2).getType());
     assertEquals(AMNodeEventType.N_IGNORE_BLACKLISTING_DISABLED, handler.events.get(3).getType());
-    assertEquals(AMNodeEventType.N_NODE_WAS_BLACKLISTED, handler.events.get(4).getType());
-    assertEquals(AMSchedulerEventType.S_NODE_BLACKLISTED, handler.events.get(5).getType());
-    assertEquals(AMNodeEventType.N_NODE_WAS_BLACKLISTED, handler.events.get(6).getType());
-    assertEquals(AMSchedulerEventType.S_NODE_BLACKLISTED, handler.events.get(7).getType());
+    assertEquals(AMSchedulerEventType.S_NODE_BLACKLISTED, handler.events.get(4).getType());
+    assertEquals(AMNodeEventType.N_NODE_WAS_BLACKLISTED, handler.events.get(5).getType());
+    assertEquals(AMSchedulerEventType.S_NODE_BLACKLISTED, handler.events.get(6).getType());
+    assertEquals(AMNodeEventType.N_NODE_WAS_BLACKLISTED, handler.events.get(7).getType());
     
     amNodeMap.stop();
   }


Mime
View raw message