incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maha...@apache.org
Subject git commit: AMBARI-3469. Allow reduce tasks of any locality. (Billie Rinaldi via mahadev)
Date Tue, 08 Oct 2013 01:56:51 GMT
Updated Branches:
  refs/heads/branch-1.4.1 631aecc47 -> 81bf224fd


AMBARI-3469. Allow reduce tasks of any locality. (Billie Rinaldi via mahadev)


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

Branch: refs/heads/branch-1.4.1
Commit: 81bf224fd6300325f1db411eb2f85fedf8a5c699
Parents: 631aecc
Author: Mahadev Konar <mahadev@apache.org>
Authored: Mon Oct 7 18:57:14 2013 -0700
Committer: Mahadev Konar <mahadev@apache.org>
Committed: Mon Oct 7 18:57:46 2013 -0700

----------------------------------------------------------------------
 .../apache/ambari/eventdb/webservice/WorkflowJsonService.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/81bf224f/ambari-server/src/main/java/org/apache/ambari/eventdb/webservice/WorkflowJsonService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/eventdb/webservice/WorkflowJsonService.java
b/ambari-server/src/main/java/org/apache/ambari/eventdb/webservice/WorkflowJsonService.java
index 7d653f2..3ef56ab 100644
--- a/ambari-server/src/main/java/org/apache/ambari/eventdb/webservice/WorkflowJsonService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/eventdb/webservice/WorkflowJsonService.java
@@ -358,7 +358,7 @@ public class WorkflowJsonService {
     data.setMapNodeLocal(processExactLocalityData(taskAttempts, "MAP", "NODE_LOCAL", io));
     data.setMapRackLocal(processExactLocalityData(taskAttempts, "MAP", "RACK_LOCAL", io));
     data.setMapOffSwitch(processExactLocalityData(taskAttempts, "MAP", "OFF_SWITCH", io));
-    data.setReduceOffSwitch(processExactLocalityData(taskAttempts, "REDUCE", "OFF_SWITCH",
io));
+    data.setReduceOffSwitch(processExactLocalityData(taskAttempts, "REDUCE", null, io));
     setRValues(data.getMapNodeLocal(), minr, maxr, io.max);
     setRValues(data.getMapRackLocal(), minr, maxr, io.max);
     setRValues(data.getMapOffSwitch(), minr, maxr, io.max);
@@ -446,7 +446,7 @@ public class WorkflowJsonService {
   private static List<DataPoint> processExactLocalityData(List<TaskAttempt> taskAttempts,
String taskType, String locality, MinMax io) {
     List<DataPoint> data = new ArrayList<DataPoint>();
     for (TaskAttempt taskAttempt : taskAttempts) {
-      if (taskType.equals(taskAttempt.getTaskType()) && locality.equals(taskAttempt.getLocality()))
{
+      if (taskType.equals(taskAttempt.getTaskType()) && (locality == null || locality.equals(taskAttempt.getLocality())))
{
         DataPoint point = new DataPoint();
         point.setX(taskAttempt.getStartTime());
         point.setY(taskAttempt.getFinishTime() - taskAttempt.getStartTime());


Mime
View raw message