Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[FLINK-7000] Add custom configuration local environment in Scala Stre…
…amExecutionEnvironment
  • Loading branch information
ch33hau committed Jun 25, 2017
commit e6db3711eca8f9e7321dfefcecee343d747db671
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,18 @@ object StreamExecutionEnvironment {
new StreamExecutionEnvironment(JavaEnv.createLocalEnvironment(parallelism))
}

/**
* 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):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can the parallelism have a default value?

Copy link
Contributor Author

@ch33hau ch33hau Jun 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it can't. I have think about it before, again compiler complains.

It could be related to this scala issue spec

If you have two overloads with defaults on the same parameter position, 
we would need a different naming scheme. 
But we want to keep the generated byte-code stable over multiple compiler runs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well that's unfortunate.

StreamExecutionEnvironment = {
new StreamExecutionEnvironment(JavaEnv.createLocalEnvironment(parallelism, configuration))
}

/**
* Creates a [[StreamExecutionEnvironment]] for local program execution that also starts the
* web monitoring UI.
Expand Down