-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
[FLINK-7000] Add custom configuration local environment in Scala StreamExecutionEnvironment #4178
Conversation
you're modifying an existing method, didn't you mean to add a new one? |
Hi @zentol , thanks for taking time for reviewing :) It was my original thought. This is what currently Java has:
Before this PR, in Scala we have:
So a Scala user can access this method by If I add another method My opinion is by just adding a parameter with default value to existing method, it doesn't change the existing way to access the method. In addition, Scala user can choose to use default values or override any one of them. There is also a test in How do you think? |
This method is part of the public API and thus must not be changed. Does the compiler still complain if there is no default value for the configuration? |
Do you mean a new method with By this way compiler won't complain, just both the value have to be entered. I could update the PR in a moment. |
Hi @zentol , I have updated PR by adding a new method without default values. Thanks =) |
…amExecutionEnvironment
* @param parallelism The parallelism for the local environment. | ||
* @param configuration Pass a custom configuration into the cluster. | ||
*/ | ||
def createLocalEnvironment(parallelism: Int, configuration: Configuration): |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well that's unfortunate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will merge this.
* @param parallelism The parallelism for the local environment. | ||
* @param configuration Pass a custom configuration into the cluster. | ||
*/ | ||
def createLocalEnvironment(parallelism: Int, configuration: Configuration): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well that's unfortunate.
…amExecutionEnvironment This closes apache#4178.
Thank you @zentol ! |
…amExecutionEnvironment This closes apache#4178.
…amExecutionEnvironment This closes apache#4178.
…amExecutionEnvironment This closes apache#4178.
…amExecutionEnvironment This closes apache#4178.
…amExecutionEnvironment This closes apache#4178.
…amExecutionEnvironment This closes apache#4178.
…amExecutionEnvironment This closes apache#4178.
See description in FLINK-7000