[jira] [Commented] (FLINK-14835) Make `org.apache.flink.configuration.Configuration` support method chaining

2019-11-29 Thread Victor Wong (Jira)


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

Victor Wong commented on FLINK-14835:
-

That's great:)

> Make `org.apache.flink.configuration.Configuration` support method chaining
> ---
>
> Key: FLINK-14835
> URL: https://issues.apache.org/jira/browse/FLINK-14835
> Project: Flink
>  Issue Type: Improvement
>  Components: Runtime / Configuration
>Affects Versions: 1.9.1
>Reporter: Victor Wong
>Priority: Major
>
> *Goal:*
> To make the following code examples work in production, which is very handy 
> for users to set a couple of configurations: 
> {code:java}
> // instantiate table environment
> TableEnvironment tEnv = ...tEnv.getConfig()// access high-level 
> configuration
>   .getConfiguration()   // set low-level key-value options
>   .setString("table.exec.mini-batch.enabled", "true")  // enable mini-batch 
> optimization
>   .setString("table.exec.mini-batch.allow-latency", "5 s") // use 5 seconds 
> to buffer input records
>   .setString("table.exec.mini-batch.size", "5000"); // the maximum number of 
> records can be buffered by each aggregate operator task
> {code}
>  
> *Suggestion:*
> Currently, the return type of `setXXX` method is "void", we can make it 
> return `Configuration` itself to support method chaining.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FLINK-14835) Make `org.apache.flink.configuration.Configuration` support method chaining

2019-11-28 Thread Chesnay Schepler (Jira)


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

Chesnay Schepler commented on FLINK-14835:
--

Starting from 1.10 you can use {{Configuration#set(ConfigOption, T)}} in 
this way (added in FLINK-14493).

Beyond that I don't think there's anything we can do.

> Make `org.apache.flink.configuration.Configuration` support method chaining
> ---
>
> Key: FLINK-14835
> URL: https://issues.apache.org/jira/browse/FLINK-14835
> Project: Flink
>  Issue Type: Improvement
>  Components: Runtime / Configuration
>Affects Versions: 1.9.1
>Reporter: Victor Wong
>Priority: Major
>
> *Goal:*
> To make the following code examples work in production, which is very handy 
> for users to set a couple of configurations: 
> {code:java}
> // instantiate table environment
> TableEnvironment tEnv = ...tEnv.getConfig()// access high-level 
> configuration
>   .getConfiguration()   // set low-level key-value options
>   .setString("table.exec.mini-batch.enabled", "true")  // enable mini-batch 
> optimization
>   .setString("table.exec.mini-batch.allow-latency", "5 s") // use 5 seconds 
> to buffer input records
>   .setString("table.exec.mini-batch.size", "5000"); // the maximum number of 
> records can be buffered by each aggregate operator task
> {code}
>  
> *Suggestion:*
> Currently, the return type of `setXXX` method is "void", we can make it 
> return `Configuration` itself to support method chaining.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FLINK-14835) Make `org.apache.flink.configuration.Configuration` support method chaining

2019-11-26 Thread Victor Wong (Jira)


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

Victor Wong commented on FLINK-14835:
-

[~jark], after changing the return type of `Configuration`, `mvn clean verify` 
failed because of japicmp error:

 
{code:java}
[ERROR] Failed to execute goal 
com.github.siom79.japicmp:japicmp-maven-plugin:0.11.0:cmp (default) on project 
flink-core: Breaking the build because there is at least one incompatibility: 
org.apache.flink.configuration.Configuration.setBoolean(java.lang.String,boolean):METHOD_RETURN_TYPE_CHANGED,org.apache.flink.configuration.Configuration.setBytes(java.lang.String,byte[]):METHOD_RETURN_TYPE_CHANGED,org.apache.flink.configuration.Configuration.setClass(java.lang.String,java.lang.Class):METHOD_RETURN_TYPE_CHANGED,org.apache.flink.configuration.Configuration.setDouble(java.lang.String,double):METHOD_RETURN_TYPE_CHANGED,org.apache.flink.configuration.Configuration.setFloat(java.lang.String,float):METHOD_RETURN_TYPE_CHANGED,org.apache.flink.configuration.Configuration.setInteger(java.lang.String,int):METHOD_RETURN_TYPE_CHANGED,org.apache.flink.configuration.Configuration.setLong(java.lang.String,long):METHOD_RETURN_TYPE_CHANGED,org.apache.flink.configuration.Configuration.setString(java.lang.String,java.lang.String):METHOD_RETURN_TYPE_CHANGED
 -> [Help 1]
{code}
It seems we have to give up this feature, right?

> Make `org.apache.flink.configuration.Configuration` support method chaining
> ---
>
> Key: FLINK-14835
> URL: https://issues.apache.org/jira/browse/FLINK-14835
> Project: Flink
>  Issue Type: Improvement
>  Components: Runtime / Configuration
>Affects Versions: 1.9.1
>Reporter: Victor Wong
>Priority: Major
>
> *Goal:*
> To make the following code examples work in production, which is very handy 
> for users to set a couple of configurations: 
> {code:java}
> // instantiate table environment
> TableEnvironment tEnv = ...tEnv.getConfig()// access high-level 
> configuration
>   .getConfiguration()   // set low-level key-value options
>   .setString("table.exec.mini-batch.enabled", "true")  // enable mini-batch 
> optimization
>   .setString("table.exec.mini-batch.allow-latency", "5 s") // use 5 seconds 
> to buffer input records
>   .setString("table.exec.mini-batch.size", "5000"); // the maximum number of 
> records can be buffered by each aggregate operator task
> {code}
>  
> *Suggestion:*
> Currently, the return type of `setXXX` method is "void", we can make it 
> return `Configuration` itself to support method chaining.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FLINK-14835) Make `org.apache.flink.configuration.Configuration` support method chaining

2019-11-18 Thread Jark Wu (Jira)


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

Jark Wu commented on FLINK-14835:
-

Personally, I'm +1 on this feature and it is backward compatible, but I'm not 
sure whether it will break japicmp.

> Make `org.apache.flink.configuration.Configuration` support method chaining
> ---
>
> Key: FLINK-14835
> URL: https://issues.apache.org/jira/browse/FLINK-14835
> Project: Flink
>  Issue Type: Improvement
>  Components: Runtime / Configuration
>Affects Versions: 1.9.1
>Reporter: Victor Wong
>Priority: Major
>
> *Goal:*
> To make the following code examples work in production, which is very handy 
> for users to set a couple of configurations: 
> {code:java}
> // instantiate table environment
> TableEnvironment tEnv = ...tEnv.getConfig()// access high-level 
> configuration
>   .getConfiguration()   // set low-level key-value options
>   .setString("table.exec.mini-batch.enabled", "true")  // enable mini-batch 
> optimization
>   .setString("table.exec.mini-batch.allow-latency", "5 s") // use 5 seconds 
> to buffer input records
>   .setString("table.exec.mini-batch.size", "5000"); // the maximum number of 
> records can be buffered by each aggregate operator task
> {code}
>  
> *Suggestion:*
> Currently, the return type of `setXXX` method is "void", we can make it 
> return `Configuration` itself to support method chaining.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)