tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jeag...@apache.org
Subject [15/50] [abbrv] tez git commit: TEZ-1726. Build broken against Hadoop-2.6.0 due to change in NodeReport. (sseth)
Date Mon, 17 Nov 2014 19:22:24 GMT
TEZ-1726. Build broken against Hadoop-2.6.0 due to change in NodeReport. (sseth)


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

Branch: refs/heads/TEZ-8
Commit: b768c0f19be158ce05c62bcc9455b75c92ac8831
Parents: b66ff72
Author: Siddharth Seth <sseth@apache.org>
Authored: Fri Oct 31 01:23:06 2014 -0700
Committer: Siddharth Seth <sseth@apache.org>
Committed: Fri Oct 31 01:23:06 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                          |  1 +
 .../tez/dag/app/rm/node/TestAMNodeTracker.java       | 15 ++++++++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/b768c0f1/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 9c28485..d43ccf7 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -96,6 +96,7 @@ ALL CHANGES:
   TEZ-1698. Cut down on ResourceCalculatorProcessTree overheads in Tez.
   TEZ-1703. addendum - fix flaky test.
   TEZ-1725. Fix nanosecond to millis conversion in TezMxBeanResourceCalculator.
+  TEZ-1726. Build broken against Hadoop-2.6.0 due to change in NodeReport.
 
 Release 0.5.1: 2014-10-02
 

http://git-wip-us.apache.org/repos/asf/tez/blob/b768c0f1/tez-dag/src/test/java/org/apache/tez/dag/app/rm/node/TestAMNodeTracker.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/node/TestAMNodeTracker.java b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/node/TestAMNodeTracker.java
index 8da2513..bc9ddee 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/node/TestAMNodeTracker.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/node/TestAMNodeTracker.java
@@ -322,9 +322,18 @@ public class TestAMNodeTracker {
   }
 
   private static NodeReport generateNodeReport(NodeId nodeId, NodeState nodeState) {
-    NodeReport nodeReport = NodeReport.newInstance(nodeId, nodeState, nodeId.getHost() +
":3433",
-        "/default-rack", Resource.newInstance(0, 0), Resource.newInstance(10240, 12), 10,
-        nodeState.toString(), System.currentTimeMillis());
+    NodeReport nodeReport = mock(NodeReport.class);
+    doReturn(nodeId).when(nodeReport).getNodeId();
+    doReturn(nodeState).when(nodeReport).getNodeState();
+    String httpAddress = nodeId.getHost() + ":3433";
+    doReturn(httpAddress).when(nodeReport).getHttpAddress();
+    doReturn("/default-rack").when(nodeReport).getRackName();
+    doReturn(Resource.newInstance(0, 0)).when(nodeReport).getUsed();
+    doReturn(Resource.newInstance(10240, 12)).when(nodeReport).getCapability();
+    doReturn(10).when(nodeReport).getNumContainers();
+    doReturn(nodeState.toString()).when(nodeReport).getHealthReport();
+    long healthReportTime = System.currentTimeMillis();
+    doReturn(healthReportTime).when(nodeReport).getLastHealthReportTime();
     return nodeReport;
   }
 }


Mime
View raw message