Return-Path: X-Original-To: apmail-flink-commits-archive@minotaur.apache.org Delivered-To: apmail-flink-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 EAC33107E0 for ; Wed, 25 Jun 2014 15:48:48 +0000 (UTC) Received: (qmail 37943 invoked by uid 500); 25 Jun 2014 15:48:48 -0000 Delivered-To: apmail-flink-commits-archive@flink.apache.org Received: (qmail 37924 invoked by uid 500); 25 Jun 2014 15:48:48 -0000 Mailing-List: contact commits-help@flink.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.incubator.apache.org Delivered-To: mailing list commits@flink.incubator.apache.org Received: (qmail 37915 invoked by uid 99); 25 Jun 2014 15:48:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jun 2014 15:48:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 25 Jun 2014 15:48:47 +0000 Received: (qmail 37559 invoked by uid 99); 25 Jun 2014 15:48:27 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jun 2014 15:48:27 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 4D94293AD25; Wed, 25 Jun 2014 15:48:27 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sewen@apache.org To: commits@flink.incubator.apache.org Date: Wed, 25 Jun 2014 15:48:28 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [2/4] git commit: Speed up "getOptimizedPlan" by not starting the local embedded runtime. X-Virus-Checked: Checked by ClamAV on apache.org Speed up "getOptimizedPlan" by not starting the local embedded runtime. Project: http://git-wip-us.apache.org/repos/asf/incubator-flink/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-flink/commit/84313956 Tree: http://git-wip-us.apache.org/repos/asf/incubator-flink/tree/84313956 Diff: http://git-wip-us.apache.org/repos/asf/incubator-flink/diff/84313956 Branch: refs/heads/master Commit: 843139562ad14c4a5980a3477b67bc1b53676b18 Parents: e2aabd9 Author: Stephan Ewen Authored: Wed Jun 25 14:47:01 2014 +0200 Committer: Stephan Ewen Committed: Wed Jun 25 16:14:18 2014 +0200 ---------------------------------------------------------------------- .../eu/stratosphere/client/LocalExecutor.java | 31 ++++---------------- 1 file changed, 5 insertions(+), 26 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/84313956/stratosphere-clients/src/main/java/eu/stratosphere/client/LocalExecutor.java ---------------------------------------------------------------------- diff --git a/stratosphere-clients/src/main/java/eu/stratosphere/client/LocalExecutor.java b/stratosphere-clients/src/main/java/eu/stratosphere/client/LocalExecutor.java index d73f893..0f50f96 100644 --- a/stratosphere-clients/src/main/java/eu/stratosphere/client/LocalExecutor.java +++ b/stratosphere-clients/src/main/java/eu/stratosphere/client/LocalExecutor.java @@ -257,32 +257,11 @@ public class LocalExecutor extends PlanExecutor { * @throws Exception */ public String getOptimizerPlanAsJSON(Plan plan) throws Exception { - synchronized (this.lock) { - - // check if we start a session dedicated for this execution - final boolean shutDownAtEnd; - if (this.nephele == null) { - // we start a session just for us now - shutDownAtEnd = true; - start(); - } else { - // we use the existing session - shutDownAtEnd = false; - } - - try { - PactCompiler pc = new PactCompiler(new DataStatistics()); - OptimizedPlan op = pc.compile(plan); - PlanJSONDumpGenerator gen = new PlanJSONDumpGenerator(); - - return gen.getOptimizerPlanAsJSON(op); - } - finally { - if (shutDownAtEnd) { - stop(); - } - } - } + PactCompiler pc = new PactCompiler(new DataStatistics()); + OptimizedPlan op = pc.compile(plan); + PlanJSONDumpGenerator gen = new PlanJSONDumpGenerator(); + + return gen.getOptimizerPlanAsJSON(op); } // --------------------------------------------------------------------------------------------