You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2017/07/01 10:06:38 UTC

[05/16] flink git commit: [FLINK-7000] Add custom configuration local environment in Scala StreamExecutionEnvironment

[FLINK-7000] Add custom configuration local environment in Scala StreamExecutionEnvironment

This closes #4178.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/acc2e34f
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/acc2e34f
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/acc2e34f

Branch: refs/heads/master
Commit: acc2e34f5045a0e239eb4e3b8affdfa69530c0a9
Parents: 80b2805
Author: Lim Chee Hau <ch...@gmail.com>
Authored: Sat Jun 24 16:26:15 2017 +0200
Committer: zentol <ch...@apache.org>
Committed: Sat Jul 1 10:02:07 2017 +0200

----------------------------------------------------------------------
 .../api/scala/StreamExecutionEnvironment.scala          | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/acc2e34f/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/StreamExecutionEnvironment.scala
----------------------------------------------------------------------
diff --git a/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/StreamExecutionEnvironment.scala b/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/StreamExecutionEnvironment.scala
index 742baf9..9fd03c3 100644
--- a/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/StreamExecutionEnvironment.scala
+++ b/flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/StreamExecutionEnvironment.scala
@@ -768,6 +768,18 @@ object StreamExecutionEnvironment {
   }
 
   /**
+   * Creates a local execution environment. The local execution environment will run the
+   * program in a multi-threaded fashion in the same JVM as the environment was created in.
+   *
+   * @param parallelism   The parallelism for the local environment.
+   * @param configuration Pass a custom configuration into the cluster.
+   */
+  def createLocalEnvironment(parallelism: Int, configuration: Configuration):
+  StreamExecutionEnvironment = {
+    new StreamExecutionEnvironment(JavaEnv.createLocalEnvironment(parallelism, configuration))
+  }
+
+  /**
    * Creates a [[StreamExecutionEnvironment]] for local program execution that also starts the
    * web monitoring UI.
    *