You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ji...@apache.org on 2023/12/02 10:00:05 UTC

(flink) 01/03: [FLINK-33600][table] new configOption to display query time cost

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

jingge pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit b001f0305c68e965e0c2ac53832806d9cade6a5e
Author: jingge <ge...@gmail.com>
AuthorDate: Fri Nov 24 02:33:33 2023 +0100

    [FLINK-33600][table] new configOption to display query time cost
---
 .../shortcodes/generated/akka_configuration.html   | 36 +++++++++++-----------
 .../generated/sql_client_configuration.html        |  6 ++++
 .../table/client/config/SqlClientOptions.java      |  8 +++++
 3 files changed, 32 insertions(+), 18 deletions(-)

diff --git a/docs/layouts/shortcodes/generated/akka_configuration.html b/docs/layouts/shortcodes/generated/akka_configuration.html
index 2d05f592b7f..901f491b37b 100644
--- a/docs/layouts/shortcodes/generated/akka_configuration.html
+++ b/docs/layouts/shortcodes/generated/akka_configuration.html
@@ -56,24 +56,6 @@
             <td>Integer</td>
             <td>Min number of threads to cap factor-based parallelism number to.</td>
         </tr>
-        <tr>
-            <td><h5>pekko.remote-fork-join-executor.parallelism-factor</h5></td>
-            <td style="word-wrap: break-word;">2.0</td>
-            <td>Double</td>
-            <td>The parallelism factor is used to determine thread pool size using the following formula: ceil(available processors * factor). Resulting size is then bounded by the parallelism-min and parallelism-max values.</td>
-        </tr>
-        <tr>
-            <td><h5>pekko.remote-fork-join-executor.parallelism-max</h5></td>
-            <td style="word-wrap: break-word;">16</td>
-            <td>Integer</td>
-            <td>Max number of threads to cap factor-based parallelism number to.</td>
-        </tr>
-        <tr>
-            <td><h5>pekko.remote-fork-join-executor.parallelism-min</h5></td>
-            <td style="word-wrap: break-word;">8</td>
-            <td>Integer</td>
-            <td>Min number of threads to cap factor-based parallelism number to.</td>
-        </tr>
         <tr>
             <td><h5>pekko.framesize</h5></td>
             <td style="word-wrap: break-word;">"10485760b"</td>
@@ -98,6 +80,24 @@
             <td>Duration</td>
             <td>Timeout used for the lookup of the JobManager. The timeout value has to contain a time-unit specifier (ms/s/min/h/d).</td>
         </tr>
+        <tr>
+            <td><h5>pekko.remote-fork-join-executor.parallelism-factor</h5></td>
+            <td style="word-wrap: break-word;">2.0</td>
+            <td>Double</td>
+            <td>The parallelism factor is used to determine thread pool size using the following formula: ceil(available processors * factor). Resulting size is then bounded by the parallelism-min and parallelism-max values.</td>
+        </tr>
+        <tr>
+            <td><h5>pekko.remote-fork-join-executor.parallelism-max</h5></td>
+            <td style="word-wrap: break-word;">16</td>
+            <td>Integer</td>
+            <td>Max number of threads to cap factor-based parallelism number to.</td>
+        </tr>
+        <tr>
+            <td><h5>pekko.remote-fork-join-executor.parallelism-min</h5></td>
+            <td style="word-wrap: break-word;">8</td>
+            <td>Integer</td>
+            <td>Min number of threads to cap factor-based parallelism number to.</td>
+        </tr>
         <tr>
             <td><h5>pekko.retry-gate-closed-for</h5></td>
             <td style="word-wrap: break-word;">50</td>
diff --git a/docs/layouts/shortcodes/generated/sql_client_configuration.html b/docs/layouts/shortcodes/generated/sql_client_configuration.html
index c9207af8803..01f237d4ea8 100644
--- a/docs/layouts/shortcodes/generated/sql_client_configuration.html
+++ b/docs/layouts/shortcodes/generated/sql_client_configuration.html
@@ -20,6 +20,12 @@
             <td>Integer</td>
             <td>Deprecated, please use table.display.max-column-width instead. When printing the query results, this parameter determines the number of characters shown on screen before truncating. This only applies to columns with variable-length types (e.g. CHAR, VARCHAR, STRING) in streaming mode. Fixed-length types and all types in batch mode are printed using a deterministic column width.</td>
         </tr>
+        <tr>
+            <td><h5>sql-client.display.print-time-cost</h5><br> <span class="label label-primary">Batch</span></td>
+            <td style="word-wrap: break-word;">true</td>
+            <td>Boolean</td>
+            <td>Determine whether to display the time consumption of the query. By default, no query time cost will be displayed.</td>
+        </tr>
         <tr>
             <td><h5>sql-client.display.show-line-numbers</h5><br> <span class="label label-primary">Batch</span> <span class="label label-primary">Streaming</span></td>
             <td style="word-wrap: break-word;">false</td>
diff --git a/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/config/SqlClientOptions.java b/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/config/SqlClientOptions.java
index c01b84203bc..ad9cb658e95 100644
--- a/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/config/SqlClientOptions.java
+++ b/flink-table/flink-sql-client/src/main/java/org/apache/flink/table/client/config/SqlClientOptions.java
@@ -70,6 +70,14 @@ public class SqlClientOptions {
                                     + "This only applies to columns with variable-length types (e.g. CHAR, VARCHAR, STRING) in streaming mode. "
                                     + "Fixed-length types and all types in batch mode are printed using a deterministic column width.");
 
+    @Documentation.TableOption(execMode = Documentation.ExecMode.BATCH)
+    public static final ConfigOption<Boolean> DISPLAY_QUERY_TIME_COST =
+            ConfigOptions.key("sql-client.display.print-time-cost")
+                    .booleanType()
+                    .defaultValue(true)
+                    .withDescription(
+                            "Determine whether to display the time consumption of the query. By default, no query time cost will be displayed.");
+
     @Documentation.TableOption(execMode = Documentation.ExecMode.BATCH_STREAMING)
     public static final ConfigOption<String> DISPLAY_DEFAULT_COLOR_SCHEMA =
             ConfigOptions.key("sql-client.display.color-schema")