drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [1/2] drill git commit: DRILL-1800: Drillbit not sending completed status message
Date Wed, 03 Dec 2014 04:49:21 GMT
Repository: drill
Updated Branches:
  refs/heads/0.7.0 [created] 58994af57


DRILL-1800: Drillbit not sending completed status message


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

Branch: refs/heads/0.7.0
Commit: 1f18c8426cf5899eff1ebb119c42a6c430ec3666
Parents: 757e9a2
Author: Parth Chandra <pchandra@maprtech.com>
Authored: Tue Dec 2 17:18:06 2014 -0800
Committer: Parth Chandra <pchandra@maprtech.com>
Committed: Tue Dec 2 17:18:06 2014 -0800

----------------------------------------------------------------------
 .../apache/drill/exec/physical/impl/ScreenCreator.java |  4 ++++
 .../org/apache/drill/exec/work/foreman/Foreman.java    | 13 ++++++-------
 2 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/1f18c842/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScreenCreator.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScreenCreator.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScreenCreator.java
index 41f6349..d884200 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScreenCreator.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/ScreenCreator.java
@@ -123,9 +123,13 @@ public class ScreenCreator implements RootCreator<Screen>{
       case NONE: {
         this.internalStop();
         QueryWritableBatch batch;
+        //TODO: At some point we should make this the last message.
+        //For the moment though, to detect memory leaks, we need to delay sending the
+        //COMPLETED message until the Foreman calls cleanup.
         QueryResult header = QueryResult.newBuilder() //
             .setQueryId(context.getHandle().getQueryId()) //
             .setRowCount(0) //
+            //.setQueryState(QueryState.COMPLETED) //
             .setDef(RecordBatchDef.getDefaultInstance()) //
             .setIsLastChunk(true) //
             .build();

http://git-wip-us.apache.org/repos/asf/drill/blob/1f18c842/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java
index 6abba0b..c26a08f 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/Foreman.java
@@ -420,13 +420,12 @@ public class Foreman implements Runnable, Closeable, Comparable<Object>
{
       case COMPLETED: {
         assert exception == null;
         recordNewState(QueryState.COMPLETED);
-//        QueryResult result = QueryResult //
-//            .newBuilder() //
-//            .setIsLastChunk(true) //
-//            .setQueryState(QueryState.COMPLETED) //
-//            .setQueryId(queryId) //
-//            .build();
-        cleanup(null);
+        QueryResult result = QueryResult //
+            .newBuilder() //
+            .setQueryState(QueryState.COMPLETED) //
+            .setQueryId(queryId) //
+            .build();
+        cleanup(result);
         return true;
       }
 


Mime
View raw message