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

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

Github user shijinkui commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2541#discussion_r80963928
  
    --- Diff: 
flink-streaming-scala/src/main/scala/org/apache/flink/streaming/api/scala/StreamExecutionEnvironment.scala
 ---
    @@ -124,7 +125,7 @@ class StreamExecutionEnvironment(javaEnv: JavaEnv) {
        * Gets the checkpoint config, which defines values like checkpoint 
interval, delay between
        * checkpoints, etc.
        */
    -  def getCheckpointConfig = javaEnv.getCheckpointConfig()
    --- End diff --
    
    IDEA ful-tip:
    Methods that follow JavaBean naming contract for accessors are expected to 
have no side effects. The recommended convention is to use a parameterless 
method whenever there are no parameters and the method have no side effect. 
This convention supports the uniform access principle, which says that client 
code should not be affected by a decision to implement an attribute as a field 
or method. The problem is that Java does not implement the uniform access 
principle. To bridge that gap, Scala allows you to leave off the empty 
parentheses on an invocation of function that takes no arguments. * Refer to 
Programming in Scala, 10.3 Defining parameterless methods


> 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