drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [16/27] git commit: DRILL-785: org.apache.drill.exec.rpc.bit.ListenerPool leak suspects
Date Sun, 27 Jul 2014 18:47:02 GMT
DRILL-785: org.apache.drill.exec.rpc.bit.ListenerPool leak suspects


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

Branch: refs/heads/master
Commit: 2a4d6f1911d86f6a58a175cd1278c06a2d7cade9
Parents: dab9629
Author: Aditya Kishore <aditya@maprtech.com>
Authored: Thu Jul 24 20:07:21 2014 -0700
Committer: Jacques Nadeau <jacques@apache.org>
Committed: Fri Jul 25 14:34:12 2014 -0700

----------------------------------------------------------------------
 .../java/org/apache/drill/exec/rpc/control/WorkEventBus.java   | 6 +++---
 .../java/org/apache/drill/exec/work/foreman/QueryManager.java  | 2 ++
 2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/2a4d6f19/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/WorkEventBus.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/WorkEventBus.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/WorkEventBus.java
index bc10d4b..28050eb 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/WorkEventBus.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/rpc/control/WorkEventBus.java
@@ -49,9 +49,9 @@ public class WorkEventBus {
     this.bee = bee;
   }
 
-  public void removeFragmentStatusListener(FragmentHandle handle) throws RpcException {
-    logger.debug("Removing framgent status listener for handle {}.", handle);
-    listeners.remove(handle);
+  public void removeFragmentStatusListener(QueryId queryId) {
+    logger.debug("Removing framgent status listener for queryId {}.", queryId);
+    listeners.remove(queryId);
   }
 
   public void setFragmentStatusListener(QueryId queryId, FragmentStatusListener listener)
throws RpcException {

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/2a4d6f19/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
index f0c1ede..ed1a428 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/foreman/QueryManager.java
@@ -174,6 +174,7 @@ public class QueryManager implements FragmentStatusListener{
               .setQueryId(queryId) //
               .build();
       foremanManagerListener.cleanupAndSendResult(result);
+      workBus.removeFragmentStatusListener(queryId);
     }
     this.status.setEndTime(System.currentTimeMillis());
     this.status.incrementFinishedFragments();
@@ -190,6 +191,7 @@ public class QueryManager implements FragmentStatusListener{
 
 
   private void stopQuery(){
+    workBus.removeFragmentStatusListener(queryId);
     // Stop all queries with a currently active status.
 //    for(FragmentData data: map.values()){
 //      FragmentHandle handle = data.getStatus().getHandle();


Mime
View raw message