You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by js...@apache.org on 2015/02/27 09:01:59 UTC
[5/9] drill git commit: DRILL-2294: Prevent collecting intermediate
stats before the operator tree was finished being constructed.
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 <al...@gmail.com>
Authored: Wed Feb 25 10:29:19 2015 -0800
Committer: Jason Altekruse <al...@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;
}