drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [5/9] drill git commit: DRILL-2294: Prevent collecting intermediate stats before the operator tree was finished being constructed.
Date Fri, 27 Feb 2015 08:01:59 GMT
DRILL-2294: Prevent collecting intermediate stats before the operator tree was finished being
constructed.


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

Branch: refs/heads/master
Commit: 8100a970cc958d61359c5b475b0cdfc67d72158b
Parents: a163c06
Author: Jason Altekruse <altekrusejason@gmail.com>
Authored: Wed Feb 25 10:29:19 2015 -0800
Committer: Jason Altekruse <altekrusejason@gmail.com>
Committed: Thu Feb 26 16:41:03 2015 -0800

----------------------------------------------------------------------
 .../apache/drill/exec/work/fragment/FragmentExecutor.java    | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/8100a970/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentExecutor.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentExecutor.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentExecutor.java
index 7ccb64e..4ab3cc0 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentExecutor.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentExecutor.java
@@ -64,10 +64,16 @@ public class FragmentExecutor implements Runnable, CancelableQuery, StatusProvid
 
   @Override
   public FragmentStatus getStatus() {
-    FragmentStatus status = AbstractStatusReporter.getBuilder(context, FragmentState.RUNNING,
null, null).build();
+    // If the query is not in a running state, the operator tree is still being constructed
and
+    // there is no reason to poll for intermediate results.
+
+    // Previously the call to get the operator stats with the AbstractStatusReporter was
happening
+    // before this check. This caused a concurrent modification exception as the list of
operator
+    // stats is iterated over while collecting info, and added to while building the operator
tree.
     if(state.get() != FragmentState.RUNNING_VALUE){
       return null;
     }
+    FragmentStatus status = AbstractStatusReporter.getBuilder(context, FragmentState.RUNNING,
null, null).build();
     return status;
   }
 


Mime
View raw message