[ 
https://issues.apache.org/jira/browse/FLINK-4669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15702025#comment-15702025
 ] 

ASF GitHub Bot commented on FLINK-4669:
---------------------------------------

Github user StephanEwen commented on the issue:

    https://github.com/apache/flink/pull/2541
  
    Sorry for asking for another iteration, but here are some comments:
    
      - The other Java code uses the primitive `int` everywhere, rather than 
the boxed integer. Let's follow that style.
    
      - I would omit the `public static ExecutionEnvironment 
createCustomLocalEnv(Integer parallelism, Configuration config)` variant. The 
benefit is very small compared to the `public static ExecutionEnvironment 
createLocalEnvironment(Configuration config)` method, but it blows up the API 
into too many variants.
    
      - Similarly, I would only have the `public static ExecutionEnvironment 
createLocalEnvWithWebUI (int port, Configuration config)` and drop the variant 
with the additional `parallelism` parameter.
    
    In general, I think it is good to not have too many method options, but 
only those that add significant functionality. For the method that starts the 
WebUI, that is the case, for the method with the additional parallelism, 
probably not.


> scala api createLocalEnvironment() function add default Configuration 
> parameter
> -------------------------------------------------------------------------------
>
>                 Key: FLINK-4669
>                 URL: https://issues.apache.org/jira/browse/FLINK-4669
>             Project: Flink
>          Issue Type: Improvement
>          Components: Streaming
>            Reporter: shijinkui
>
> scala program can't direct use createLocalEnvironment with custom Configure 
> object.
> such as I want to start web server in local mode, I will do such as:
> ```
> // set up execution environment
> val conf = new Configuration
> conf.setBoolean(ConfigConstants.LOCAL_START_WEBSERVER, true)
> conf.setInteger(ConfigConstants.JOB_MANAGER_WEB_PORT_KEY, 
> ConfigConstants.DEFAULT_JOB_MANAGER_WEB_FRONTEND_PORT)
> val env = new org.apache.flink.streaming.api.scala.StreamExecutionEnvironment(
>   
> org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.createLocalEnvironment(2,
>  conf)
> )
> ```
> so we need createLocalEnvironment function have a config parameter 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to