You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Victor Wong (Jira)" <ji...@apache.org> on 2019/11/15 11:19:00 UTC
[jira] [Updated] (FLINK-14817) "Streaming Aggregation" document
contains misleading code examples
[ https://issues.apache.org/jira/browse/FLINK-14817?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Victor Wong updated FLINK-14817:
--------------------------------
Description:
In the document of [Streaming Aggregation|[https://ci.apache.org/projects/flink/flink-docs-stable/dev/table/tuning/streaming_aggregation_optimization.html]] there are some misleading code examples, e.g.
{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}
It seems `Configuration` supports method chaining, while it's not true since the return type of `Configuration#setString` is Void.
So what about making `Configuration` support method chaining, or updating the documentation?
was:
In the document of [Streaming Aggregation|[https://ci.apache.org/projects/flink/flink-docs-stable/dev/table/tuning/streaming_aggregation_optimization.html],] there are some misleading code examples, e.g.
{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}
It seems `Configuration` supports method chaining, while it's not true since the return type of `Configuration#setString` is Void.
So what about making `Configuration` support method chaining, or updating the documentation?
> "Streaming Aggregation" document contains misleading code examples
> ------------------------------------------------------------------
>
> Key: FLINK-14817
> URL: https://issues.apache.org/jira/browse/FLINK-14817
> Project: Flink
> Issue Type: Bug
> Components: Documentation
> Affects Versions: 1.9.1
> Reporter: Victor Wong
> Priority: Major
>
> In the document of [Streaming Aggregation|[https://ci.apache.org/projects/flink/flink-docs-stable/dev/table/tuning/streaming_aggregation_optimization.html]] there are some misleading code examples, e.g.
> {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}
> It seems `Configuration` supports method chaining, while it's not true since the return type of `Configuration#setString` is Void.
>
> So what about making `Configuration` support method chaining, or updating the documentation?
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)