This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch release-1.10
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.10 by this push:
     new 6c5621e  [FLINK-16567][table][doc] Update to TableConfig in 
query_configuration document
6c5621e is described below

commit 6c5621eadded6ab9d0a963a22e52e0d308c307a6
Author: 漫步云端 <jinhai...@gmail.com>
AuthorDate: Tue Mar 24 12:05:21 2020 +0800

    [FLINK-16567][table][doc] Update to TableConfig in query_configuration 
document
    
    
    This closes #11410
---
 docs/dev/table/streaming/query_configuration.md    | 34 +++++++++++-----------
 docs/dev/table/streaming/query_configuration.zh.md | 34 +++++++++++-----------
 2 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/docs/dev/table/streaming/query_configuration.md 
b/docs/dev/table/streaming/query_configuration.md
index 2a2f50c..3bf0c45 100644
--- a/docs/dev/table/streaming/query_configuration.md
+++ b/docs/dev/table/streaming/query_configuration.md
@@ -24,7 +24,7 @@ under the License.
 
 Table API and SQL queries have the same semantics regardless whether their 
input is bounded batch input or unbounded stream input. In many cases, 
continuous queries on streaming input are capable of computing accurate results 
that are identical to offline computed results. However, this is not possible 
in general case because continuous queries have to restrict the size of the 
state they are maintaining in order to avoid to run out of storage and to be 
able to process unbounded streaming [...]
 
-Flink's Table API and SQL interface provide parameters to tune the accuracy 
and resource consumption of continuous queries. The parameters are specified 
via a `QueryConfig` object. The `QueryConfig` can be obtained from the 
`TableEnvironment` and is passed back when a `Table` is translated, i.e., when 
it is [transformed into a DataStream]({{ site.baseurl 
}}/dev/table/common.html#convert-a-table-into-a-datastream-or-dataset) or 
[emitted via a TableSink](../common.html#emit-a-table).
+Flink's Table API and SQL interface provide parameters to tune the accuracy 
and resource consumption of continuous queries. The parameters are specified 
via a `TableConfig` object. The `TableConfig` can be obtained from the 
`TableEnvironment` and is passed back when a `Table` is translated, i.e., when 
it is [transformed into a DataStream]({{ site.baseurl 
}}/dev/table/common.html#convert-a-table-into-a-datastream-or-dataset) or 
[emitted via a TableSink](../common.html#emit-a-table).
 
 <div class="codetabs" markdown="1">
 <div data-lang="java" markdown="1">
@@ -33,9 +33,9 @@ StreamExecutionEnvironment env = 
StreamExecutionEnvironment.getExecutionEnvironm
 StreamTableEnvironment tableEnv = StreamTableEnvironment.create(env);
 
 // obtain query configuration from TableEnvironment
-StreamQueryConfig qConfig = tableEnv.queryConfig();
+TableConfig tConfig = tableEnv.getConfig();
 // set query parameters
-qConfig.withIdleStateRetentionTime(Time.hours(12), Time.hours(24));
+tConfig.setIdleStateRetentionTime(Time.hours(12), Time.hours(24));
 
 // define query
 Table result = ...
@@ -51,10 +51,10 @@ tableEnv.registerTableSink(
   sink);                       // table sink
 
 // emit result Table via a TableSink
-result.insertInto("outputTable", qConfig);
+result.insertInto("outputTable");
 
 // convert result Table into a DataStream<Row>
-DataStream<Row> stream = tableEnv.toAppendStream(result, Row.class, qConfig);
+DataStream<Row> stream = tableEnv.toAppendStream(result, Row.class);
 
 {% endhighlight %}
 </div>
@@ -64,9 +64,9 @@ val env = StreamExecutionEnvironment.getExecutionEnvironment
 val tableEnv = StreamTableEnvironment.create(env)
 
 // obtain query configuration from TableEnvironment
-val qConfig: StreamQueryConfig = tableEnv.queryConfig
+val tConfig: TableConfig = tableEnv.getConfig
 // set query parameters
-qConfig.withIdleStateRetentionTime(Time.hours(12), Time.hours(24))
+tConfig.setIdleStateRetentionTime(Time.hours(12), Time.hours(24))
 
 // define query
 val result: Table = ???
@@ -82,16 +82,16 @@ tableEnv.registerTableSink(
   sink)                           // table sink
 
 // emit result Table via a TableSink
-result.insertInto("outputTable", qConfig)
+result.insertInto("outputTable")
 
 // convert result Table into a DataStream[Row]
-val stream: DataStream[Row] = result.toAppendStream[Row](qConfig)
+val stream: DataStream[Row] = result.toAppendStream[Row]
 
 {% endhighlight %}
 </div>
 <div data-lang="python" markdown="1">
 {% highlight python %}
-# use TableConfig instead of QueryConfig in python API
+# use TableConfig in python API
 t_config = TableConfig()
 # set query parameters
 t_config.set_idle_state_retention_time(timedelta(hours=12), 
timedelta(hours=24))
@@ -116,7 +116,7 @@ result.insert_into("outputTable")
 </div>
 </div>
 
-In the following we describe the parameters of the `QueryConfig` and how they 
affect the accuracy and resource consumption of a query.
+In the following we describe the parameters of the `TableConfig` and how they 
affect the accuracy and resource consumption of a query.
 
 Idle State Retention Time
 -------------------------
@@ -145,30 +145,30 @@ The parameters are specified as follows:
 <div data-lang="java" markdown="1">
 {% highlight java %}
 
-StreamQueryConfig qConfig = ...
+TableConfig tConfig = ...
 
 // set idle state retention time: min = 12 hours, max = 24 hours
-qConfig.withIdleStateRetentionTime(Time.hours(12), Time.hours(24));
+tConfig.setIdleStateRetentionTime(Time.hours(12), Time.hours(24));
 
 {% endhighlight %}
 </div>
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
 
-val qConfig: StreamQueryConfig = ???
+val tConfig: TableConfig = ???
 
 // set idle state retention time: min = 12 hours, max = 24 hours
-qConfig.withIdleStateRetentionTime(Time.hours(12), Time.hours(24))
+tConfig.setIdleStateRetentionTime(Time.hours(12), Time.hours(24))
 
 {% endhighlight %}
 </div>
 <div data-lang="python" markdown="1">
 {% highlight python %}
 
-q_config = ...  # type: StreamQueryConfig
+t_config = ...  # type: TableConfig
 
 # set idle state retention time: min = 12 hours, max = 24 hours
-q_config.with_idle_state_retention_time(timedelta(hours=12), 
timedelta(hours=24))
+t_config.set_idle_state_retention_time(timedelta(hours=12), 
timedelta(hours=24))
 
 {% endhighlight %}
 </div>
diff --git a/docs/dev/table/streaming/query_configuration.zh.md 
b/docs/dev/table/streaming/query_configuration.zh.md
index 2a2f50c..3bf0c45 100644
--- a/docs/dev/table/streaming/query_configuration.zh.md
+++ b/docs/dev/table/streaming/query_configuration.zh.md
@@ -24,7 +24,7 @@ under the License.
 
 Table API and SQL queries have the same semantics regardless whether their 
input is bounded batch input or unbounded stream input. In many cases, 
continuous queries on streaming input are capable of computing accurate results 
that are identical to offline computed results. However, this is not possible 
in general case because continuous queries have to restrict the size of the 
state they are maintaining in order to avoid to run out of storage and to be 
able to process unbounded streaming [...]
 
-Flink's Table API and SQL interface provide parameters to tune the accuracy 
and resource consumption of continuous queries. The parameters are specified 
via a `QueryConfig` object. The `QueryConfig` can be obtained from the 
`TableEnvironment` and is passed back when a `Table` is translated, i.e., when 
it is [transformed into a DataStream]({{ site.baseurl 
}}/dev/table/common.html#convert-a-table-into-a-datastream-or-dataset) or 
[emitted via a TableSink](../common.html#emit-a-table).
+Flink's Table API and SQL interface provide parameters to tune the accuracy 
and resource consumption of continuous queries. The parameters are specified 
via a `TableConfig` object. The `TableConfig` can be obtained from the 
`TableEnvironment` and is passed back when a `Table` is translated, i.e., when 
it is [transformed into a DataStream]({{ site.baseurl 
}}/dev/table/common.html#convert-a-table-into-a-datastream-or-dataset) or 
[emitted via a TableSink](../common.html#emit-a-table).
 
 <div class="codetabs" markdown="1">
 <div data-lang="java" markdown="1">
@@ -33,9 +33,9 @@ StreamExecutionEnvironment env = 
StreamExecutionEnvironment.getExecutionEnvironm
 StreamTableEnvironment tableEnv = StreamTableEnvironment.create(env);
 
 // obtain query configuration from TableEnvironment
-StreamQueryConfig qConfig = tableEnv.queryConfig();
+TableConfig tConfig = tableEnv.getConfig();
 // set query parameters
-qConfig.withIdleStateRetentionTime(Time.hours(12), Time.hours(24));
+tConfig.setIdleStateRetentionTime(Time.hours(12), Time.hours(24));
 
 // define query
 Table result = ...
@@ -51,10 +51,10 @@ tableEnv.registerTableSink(
   sink);                       // table sink
 
 // emit result Table via a TableSink
-result.insertInto("outputTable", qConfig);
+result.insertInto("outputTable");
 
 // convert result Table into a DataStream<Row>
-DataStream<Row> stream = tableEnv.toAppendStream(result, Row.class, qConfig);
+DataStream<Row> stream = tableEnv.toAppendStream(result, Row.class);
 
 {% endhighlight %}
 </div>
@@ -64,9 +64,9 @@ val env = StreamExecutionEnvironment.getExecutionEnvironment
 val tableEnv = StreamTableEnvironment.create(env)
 
 // obtain query configuration from TableEnvironment
-val qConfig: StreamQueryConfig = tableEnv.queryConfig
+val tConfig: TableConfig = tableEnv.getConfig
 // set query parameters
-qConfig.withIdleStateRetentionTime(Time.hours(12), Time.hours(24))
+tConfig.setIdleStateRetentionTime(Time.hours(12), Time.hours(24))
 
 // define query
 val result: Table = ???
@@ -82,16 +82,16 @@ tableEnv.registerTableSink(
   sink)                           // table sink
 
 // emit result Table via a TableSink
-result.insertInto("outputTable", qConfig)
+result.insertInto("outputTable")
 
 // convert result Table into a DataStream[Row]
-val stream: DataStream[Row] = result.toAppendStream[Row](qConfig)
+val stream: DataStream[Row] = result.toAppendStream[Row]
 
 {% endhighlight %}
 </div>
 <div data-lang="python" markdown="1">
 {% highlight python %}
-# use TableConfig instead of QueryConfig in python API
+# use TableConfig in python API
 t_config = TableConfig()
 # set query parameters
 t_config.set_idle_state_retention_time(timedelta(hours=12), 
timedelta(hours=24))
@@ -116,7 +116,7 @@ result.insert_into("outputTable")
 </div>
 </div>
 
-In the following we describe the parameters of the `QueryConfig` and how they 
affect the accuracy and resource consumption of a query.
+In the following we describe the parameters of the `TableConfig` and how they 
affect the accuracy and resource consumption of a query.
 
 Idle State Retention Time
 -------------------------
@@ -145,30 +145,30 @@ The parameters are specified as follows:
 <div data-lang="java" markdown="1">
 {% highlight java %}
 
-StreamQueryConfig qConfig = ...
+TableConfig tConfig = ...
 
 // set idle state retention time: min = 12 hours, max = 24 hours
-qConfig.withIdleStateRetentionTime(Time.hours(12), Time.hours(24));
+tConfig.setIdleStateRetentionTime(Time.hours(12), Time.hours(24));
 
 {% endhighlight %}
 </div>
 <div data-lang="scala" markdown="1">
 {% highlight scala %}
 
-val qConfig: StreamQueryConfig = ???
+val tConfig: TableConfig = ???
 
 // set idle state retention time: min = 12 hours, max = 24 hours
-qConfig.withIdleStateRetentionTime(Time.hours(12), Time.hours(24))
+tConfig.setIdleStateRetentionTime(Time.hours(12), Time.hours(24))
 
 {% endhighlight %}
 </div>
 <div data-lang="python" markdown="1">
 {% highlight python %}
 
-q_config = ...  # type: StreamQueryConfig
+t_config = ...  # type: TableConfig
 
 # set idle state retention time: min = 12 hours, max = 24 hours
-q_config.with_idle_state_retention_time(timedelta(hours=12), 
timedelta(hours=24))
+t_config.set_idle_state_retention_time(timedelta(hours=12), 
timedelta(hours=24))
 
 {% endhighlight %}
 </div>

Reply via email to