flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [2/4] git commit: Speed up "getOptimizedPlan" by not starting the local embedded runtime.
Date Wed, 25 Jun 2014 15:48:28 GMT
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 <sewen@apache.org>
Authored: Wed Jun 25 14:47:01 2014 +0200
Committer: Stephan Ewen <sewen@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);
 	}
 	
 	// --------------------------------------------------------------------------------------------


Mime
View raw message