You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by dz...@apache.org on 2023/01/21 10:25:09 UTC

[drill-site] branch master updated (1afc0c0bd -> 41f8d0779)

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

dzamo pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/drill-site.git


    from 1afc0c0bd Update javadoc for Drill 1.20.3.
     new f6a6c4317 Adjust release numbers listed in the Splunk config table from 2.0 to 1.21.
     new 41f8d0779 Add Special Considerations for CTAS to using-jdbc-driver.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../plugins/140-splunk-storage-plugin.md           | 30 +++++++++++-----------
 .../odbc-jdbc-interfaces/015-using-jdbc-driver.md  | 30 +++++++++++++++++++---
 2 files changed, 41 insertions(+), 19 deletions(-)


[drill-site] 02/02: Add Special Considerations for CTAS to using-jdbc-driver.

Posted by dz...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dzamo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill-site.git

commit 41f8d0779456a941f8884a9d927d5fa91841b641
Author: James Turton <ja...@somecomputer.xyz>
AuthorDate: Sat Jan 21 12:24:01 2023 +0200

    Add Special Considerations for CTAS to using-jdbc-driver.
---
 .../odbc-jdbc-interfaces/015-using-jdbc-driver.md  | 30 +++++++++++++++++++---
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/_docs/en/odbc-jdbc-interfaces/015-using-jdbc-driver.md b/_docs/en/odbc-jdbc-interfaces/015-using-jdbc-driver.md
index 94181d18a..1b81b3dbc 100644
--- a/_docs/en/odbc-jdbc-interfaces/015-using-jdbc-driver.md
+++ b/_docs/en/odbc-jdbc-interfaces/015-using-jdbc-driver.md
@@ -87,7 +87,7 @@ where
 
 `drillbit=<node name>` specifies one or more host names or IP addresses of cluster nodes running Drill.
 
-###`tries` Parameter
+### `tries` Parameter
 
 As of Drill 1.10, you can include the optional `tries=<value>` parameter in the connection string, as shown in the following URL:
 
@@ -115,9 +115,6 @@ Starting in Drill 1.16, the DrillStatement interface supports the setMaxRows met
 
 Starting in 1.13, the DrillStatement interface supports the setQueryTimeout method. The setQueryTimeout method limits the amount of time that the JDBC driver allows a query to run before canceling the query. The setQueryTimeout method sets the number of seconds that the JDBC driver waits for a Statement object to execute before canceling it. By default, there is no limit on the amount of time allowed for a running statement to complete. When you configure a limit, an SQLTimeoutException  [...]
 
-
-
-
 ## Example of Connecting to Drill Programmatically
 
 The following sample code shows you how to use the class name in a snippet to connect to Drill using the Drill-Jdbc-all driver:
@@ -132,3 +129,28 @@ while(rs.next()){
 System.out.println(rs.getString(1));
 }
 ```
+
+## Ensuring the completion of CTAS queries
+
+When a JDBC client issues a CTAS (CREATE TABLE AS SELECT ...) statement then Drill will return a record for each completed writer fragment containing the number of records that fragment wrote. These records are returned in the usual streaming fashion as writer fragments complete, their order being unknowable in advance. If the client application immediately closes its clientside JDBC resources after its call to Statement.executeQuery has returned as follows
+```java
+Statement ctasStatement = conn.createStatement();
+ResultSet ctasResults = ctasStatement.executeQuery(ctasQueryText);
+ctasResults.close();
+ctasStatement.close();
+```
+then it may be that the CTAS statement is still executing, and that is unintentionally cancelled before completing depending on good or bad luck with respect to timing.
+
+The cancellation of the CTAS statement is usually benign if it spawned only one writer fragment, but if it spawned more than one then the chances increase that at least one writer will be interrupted before it has finished writing, resulting in incomplete or even corrupted output. Even in the benign case, such queries conclude in the CANCELLED state rather than the COMPLETED state resulting in misleading query logs and profiles.
+
+To have CTAS queries reliably run to completion the JDBC client should wait for all of the writer fragments to complete before it closes its JDBC resources by scrolling through the ResultSet before closing it. Using try-with-resources syntax,
+
+```java
+try (
+  Statement ctasStatement = conn.createStatement();
+  ResultSet ctasResults = ctasStatement.executeQuery(ctasQueryText);
+) {
+  while (ctasResults.next()); // scroll through results to ensure that we wait for query completion
+}
+```
+      


[drill-site] 01/02: Adjust release numbers listed in the Splunk config table from 2.0 to 1.21.

Posted by dz...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dzamo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill-site.git

commit f6a6c43171eb54663e217430b9dfb05c59c1d722
Author: James Turton <ja...@somecomputer.xyz>
AuthorDate: Mon Jan 9 14:23:24 2023 +0200

    Adjust release numbers listed in the Splunk config table from 2.0 to 1.21.
---
 .../plugins/140-splunk-storage-plugin.md           | 30 +++++++++++-----------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/_docs/en/connect-a-data-source/plugins/140-splunk-storage-plugin.md b/_docs/en/connect-a-data-source/plugins/140-splunk-storage-plugin.md
index e42aaf6af..c64ed8e57 100644
--- a/_docs/en/connect-a-data-source/plugins/140-splunk-storage-plugin.md
+++ b/_docs/en/connect-a-data-source/plugins/140-splunk-storage-plugin.md
@@ -30,21 +30,21 @@ containing the following properties.
 
 ### Configuration Options
 
-| Option               | Default   | Description                                                     | Since |
-| -------------------- | --------- | --------------------------------------------------------------- | ----- |
-| type                 | (none)    | Set to "splunk" to use this plugin                              | 1.19  |
-| username             | null      | Splunk username to be used by Drill                             | 1.19  |
-| password             | null      | Splunk password to be used by Drill                             | 1.19  |
-| scheme               | https     | The scheme with which to access the Splunk host                 | 2.0   |
-| hostname             | localhost | Splunk host to be queried by Drill                              | 1.19  |
-| port                 | 8089      | TCP port over which Drill will connect to Splunk                | 1.19  |
-| earliestTime         | null      | Global earliest record timestamp default                        | 1.19  |
-| latestTime           | null      | Global latest record timestamp default                          | 1.19  |
-| app                  | null      | The application context of the service[^1]                      | 2.0   |
-| owner                | null      | The owner context of the service[^1]                            | 2.0   |
-| token                | null      | A Splunk authentication token to use for the session[^2]        | 2.0   |
-| cookie               | null      | A valid login cookie                                            | 2.0   |
-| validateCertificates | true      | Whether the Splunk client will validates the server's SSL cert  | 2.0   |
+| Option               | Default   | Description                                                    | Since |
+| -------------------- | --------- | -------------------------------------------------------------- | ----- |
+| type                 | (none)    | Set to "splunk" to use this plugin                             | 1.19  |
+| username             | null      | Splunk username to be used by Drill                            | 1.19  |
+| password             | null      | Splunk password to be used by Drill                            | 1.19  |
+| scheme               | https     | The scheme with which to access the Splunk host                | 1.21  |
+| hostname             | localhost | Splunk host to be queried by Drill                             | 1.19  |
+| port                 | 8089      | TCP port over which Drill will connect to Splunk               | 1.19  |
+| earliestTime         | null      | Global earliest record timestamp default                       | 1.19  |
+| latestTime           | null      | Global latest record timestamp default                         | 1.19  |
+| app                  | null      | The application context of the service\[^1\]                   | 1.21  |
+| owner                | null      | The owner context of the service\[^1\]                         | 1.21  |
+| token                | null      | A Splunk authentication token to use for the session\[^2\]     | 1.21  |
+| cookie               | null      | A valid login cookie                                           | 1.21  |
+| validateCertificates | true      | Whether the Splunk client will validates the server's SSL cert | 1.21  |
 
 [^1]: See [this Splunk documentation](https://docs.splunk.com/Documentation/Splunk/latest/Admin/Apparchitectureandobjectownership) for more information.
 [^2]: See [this Splunk documentation](https://docs.splunk.com/Documentation/Splunk/latest/Security/CreateAuthTokens) for more information.