From drill-commits-return-564-apmail-incubator-drill-commits-archive=incubator.apache.org@incubator.apache.org Sun Jul 27 18:46:53 2014 Return-Path: X-Original-To: apmail-incubator-drill-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-drill-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8484411C9A for ; Sun, 27 Jul 2014 18:46:53 +0000 (UTC) Received: (qmail 79395 invoked by uid 500); 27 Jul 2014 18:46:48 -0000 Delivered-To: apmail-incubator-drill-commits-archive@incubator.apache.org Received: (qmail 79323 invoked by uid 500); 27 Jul 2014 18:46:48 -0000 Mailing-List: contact drill-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: drill-commits@incubator.apache.org Delivered-To: mailing list drill-commits@incubator.apache.org Received: (qmail 78854 invoked by uid 99); 27 Jul 2014 18:46:48 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 27 Jul 2014 18:46:48 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id DAAE49B6FB6; Sun, 27 Jul 2014 18:46:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jacques@apache.org To: drill-commits@incubator.apache.org Date: Sun, 27 Jul 2014 18:47:02 -0000 Message-Id: <4b4d72d2c46a43ea9eda1079283139b1@git.apache.org> In-Reply-To: <1cb5904e6de44e3e9ae8a2c6d16649f1@git.apache.org> References: <1cb5904e6de44e3e9ae8a2c6d16649f1@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [16/27] git commit: DRILL-785: org.apache.drill.exec.rpc.bit.ListenerPool leak suspects 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 Authored: Thu Jul 24 20:07:21 2014 -0700 Committer: Jacques Nadeau 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();