You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by ja...@apache.org on 2014/06/16 23:31:26 UTC

[17/32] git commit: More stats fixes: In PlanningSet, get majorFragmentId from the physical plan.

More stats fixes: In PlanningSet, get majorFragmentId from the physical plan.

This is so the majorFragmentIds in the profiles will match those in the physical plan.


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

Branch: refs/heads/master
Commit: 2b5ae075f75f51b81fa39b14c6a96090c2673ba0
Parents: 57a86d4
Author: Steven Phillips <sp...@maprtech.com>
Authored: Sat Jun 14 14:10:06 2014 -0700
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Mon Jun 16 08:04:44 2014 -0700

----------------------------------------------------------------------
 .../org/apache/drill/exec/planner/fragment/PlanningSet.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/2b5ae075/exec/java-exec/src/main/java/org/apache/drill/exec/planner/fragment/PlanningSet.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/fragment/PlanningSet.java b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/fragment/PlanningSet.java
index 6795588..3164228 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/fragment/PlanningSet.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/fragment/PlanningSet.java
@@ -29,8 +29,7 @@ public class PlanningSet implements Iterable<Wrapper>{
   static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(PlanningSet.class);
   
   private Map<Fragment, Wrapper> fragmentMap = Maps.newHashMap();
-  private int majorFragmentIdIndex = 0;
-  
+
   PlanningSet(){
   }
 
@@ -45,7 +44,8 @@ public class PlanningSet implements Iterable<Wrapper>{
   Wrapper get(Fragment node){
     Wrapper wrapper = fragmentMap.get(node);
     if(wrapper == null){
-      wrapper = new Wrapper(node, majorFragmentIdIndex++);
+      int majorFragmentId = node.getRoot().getOperatorId() == 0 ? 0 : node.getSendingExchange().getChild().getOperatorId() >> 16;
+      wrapper = new Wrapper(node, majorFragmentId);
       fragmentMap.put(node,  wrapper);
     }
     return wrapper;