You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2014/06/25 17:48:28 UTC
[2/4] git commit: Speed up "getOptimizedPlan" by not starting the
local embedded runtime.
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 <se...@apache.org>
Authored: Wed Jun 25 14:47:01 2014 +0200
Committer: Stephan Ewen <se...@apache.org>
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);
}
// --------------------------------------------------------------------------------------------