From 7dd7e4b59849492310fc42a1a437fdc71d9c04b3 Mon Sep 17 00:00:00 2001
From: karel rehor
Date: Wed, 18 Dec 2024 17:15:20 +0100
Subject: [PATCH 1/5] docs: (WIP) updates onboarding steps for the
influxdb3-java client.
---
.../components/steps/java/ExecuteQuerySql.tsx | 116 +++++++++++++++---
.../steps/java/InitializeClientSql.tsx | 4 +-
.../steps/java/InstallDependenciesSql.tsx | 10 +-
.../components/steps/java/WriteDataSql.tsx | 92 +++++++++-----
4 files changed, 170 insertions(+), 52 deletions(-)
diff --git a/src/homepageExperience/components/steps/java/ExecuteQuerySql.tsx b/src/homepageExperience/components/steps/java/ExecuteQuerySql.tsx
index be91f98c1f..6d2b352310 100644
--- a/src/homepageExperience/components/steps/java/ExecuteQuerySql.tsx
+++ b/src/homepageExperience/components/steps/java/ExecuteQuerySql.tsx
@@ -19,29 +19,97 @@ FROM 'census'
WHERE time >= now() - interval '1 hour'
AND ('bees' IS NOT NULL OR 'ants' IS NOT NULL) order by time asc`
- const query = `String sql = "SELECT * " +
- "FROM 'census' " +
- "WHERE time >= now() - interval '1 hour' " +
- "AND ('bees' IS NOT NULL OR 'ants' IS NOT NULL) order by time asc";
+ const query = ` String sql = "SELECT * " +
+ "FROM 'census' " +
+ "WHERE time >= now() - interval '5 minutes' " +
+ "AND ('$species1' IS NOT NULL OR '$species2' IS NOT NULL) order by time asc";
-System.out.printf("| %-5s | %-5s | %-8s | %-30s |%n", "ants", "bees", "location", "time");
-try (Stream
The client API will pass through null values for mismatched or missing
tags, fields and timestamps. In anticipation of this possibility copy the
- following static helper methods to the bottom of
+ following static helper methods to the bottom of
the InfluxClientExample class.
{
}
}`
- const dataPrep = `String database = "${bucket.name}"
+ const dataPrep = ` String database = "${bucket.name}";
List records = Arrays.asList(
new CensusRecord("Klamath", "bees", 23),
From 098de94f89476c62c39751cb9a250667249a9f4e Mon Sep 17 00:00:00 2001
From: karel rehor
Date: Mon, 6 Jan 2025 16:58:58 +0100
Subject: [PATCH 3/5] chore: run prettier:fix
---
.../components/steps/java/ExecuteQuerySql.tsx | 56 +++++++++++--------
.../components/steps/java/WriteDataSql.tsx | 24 +++++---
2 files changed, 48 insertions(+), 32 deletions(-)
diff --git a/src/homepageExperience/components/steps/java/ExecuteQuerySql.tsx b/src/homepageExperience/components/steps/java/ExecuteQuerySql.tsx
index 5cefdb3b73..f3464a3ec5 100644
--- a/src/homepageExperience/components/steps/java/ExecuteQuerySql.tsx
+++ b/src/homepageExperience/components/steps/java/ExecuteQuerySql.tsx
@@ -75,21 +75,26 @@ AND ('bees' IS NOT NULL OR 'ants' IS NOT NULL) order by time asc`
return (
<>
Execute a SQL Query
-
The query transport makes use of Apache Arrow Flight to
- shorten processing time. When executing queries Arrow needs
- access to internal JVM resources. This means setting the
- following JVM argument: --add-opens=java.base/java.nio=ALL-UNNAMED
+
+ The query transport makes use of Apache Arrow Flight to shorten
+ processing time. When executing queries Arrow needs access to internal
+ JVM resources. This means setting the following JVM argument:{' '}
+ --add-opens=java.base/java.nio=ALL-UNNAMED
+
Java
-
With straightforward Java this can be done with an
- environment variable:
+
+ With straightforward Java this can be done with an environment variable:
+
Maven
-
This argument can also be added to MAVEN_OPTS:
+
+ This argument can also be added to MAVEN_OPTS:
+
Gradle
-
With gradle this can be added to the build file, e.g. in build.gradle.kts:
+
+ With gradle this can be added to the build file, e.g. in{' '}
+ build.gradle.kts:
+
-
The client API will pass through null values for mismatched or missing
- tags, fields and timestamps. In anticipation of this possibility copy the
- following static helper methods to the bottom of
- the InfluxClientExample class.
+
+ The client API will pass through null values for mismatched or missing
+ tags, fields and timestamps. In anticipation of this possibility copy
+ the following static helper methods to the bottom of the{' '}
+ InfluxClientExample class.
+
- Now let's use the model SQL query in our Java code
- to show us the results of what we have written. Furthermore, let's use the SQL query
- parameters feature of the client library to make query calls more
+ Now let's use the model SQL query in our Java code to show
+ us the results of what we have written. Furthermore, let's use the SQL
+ query parameters feature of the client library to make query calls more
dynamic.
- The following code replaces the fixed values of "bees" and "ants"
- with the parameters $species1 and $species2.
- Add it to the InfluxClientExample class after the
- write code added in the previous step:
+ The following code replaces the fixed values of "bees" and "ants" with
+ the parameters $species1 and $species2. Add it
+ to the InfluxClientExample class after the write
+ code added in the previous step:
diff --git a/src/homepageExperience/components/steps/java/WriteDataSql.tsx b/src/homepageExperience/components/steps/java/WriteDataSql.tsx
index cbe34728f1..65fb142ed7 100644
--- a/src/homepageExperience/components/steps/java/WriteDataSql.tsx
+++ b/src/homepageExperience/components/steps/java/WriteDataSql.tsx
@@ -259,23 +259,29 @@ export const WriteDataSqlComponent = (props: OwnProps) => {
These concepts are important in building your time-series schema. Now,
let's write this data into our bucket.
-
First, add the following internal class to the
- InfluxClientExampleabove the main method:
+
+ First, add the following internal class to the
+ InfluxClientExampleabove the main{' '}
+ method:
+
-
Then, copy the following data preparation statements, into
- the main method above the try(InfluxDBClient ...) block:
+
+ Then, copy the following data preparation statements, into the{' '}
+ main method above the{' '}
+ try(InfluxDBClient ...) block:
+
- Finally, add the following
- code within the try(InfluxDBClient ...) block:
+ Finally, add the following code within the{' '}
+ try(InfluxDBClient ...) block:
Date: Wed, 8 Jan 2025 10:28:26 +0100
Subject: [PATCH 4/5] docs: update wording of query requirements for Arrow.
---
.../components/steps/java/ExecuteQuerySql.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/homepageExperience/components/steps/java/ExecuteQuerySql.tsx b/src/homepageExperience/components/steps/java/ExecuteQuerySql.tsx
index f3464a3ec5..47ff74736b 100644
--- a/src/homepageExperience/components/steps/java/ExecuteQuerySql.tsx
+++ b/src/homepageExperience/components/steps/java/ExecuteQuerySql.tsx
@@ -78,12 +78,12 @@ AND ('bees' IS NOT NULL OR 'ants' IS NOT NULL) order by time asc`
The query transport makes use of Apache Arrow Flight to shorten
processing time. When executing queries Arrow needs access to internal
- JVM resources. This means setting the following JVM argument:{' '}
+ JVM resources. This requires setting the following JVM argument:{' '}
--add-opens=java.base/java.nio=ALL-UNNAMED
Java
- With straightforward Java this can be done with an environment variable:
+ This can be done with an environment variable:
Date: Wed, 8 Jan 2025 10:40:52 +0100
Subject: [PATCH 5/5] chore: rerun linter
---
.../components/steps/java/ExecuteQuerySql.tsx | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/homepageExperience/components/steps/java/ExecuteQuerySql.tsx b/src/homepageExperience/components/steps/java/ExecuteQuerySql.tsx
index 47ff74736b..40ede60b22 100644
--- a/src/homepageExperience/components/steps/java/ExecuteQuerySql.tsx
+++ b/src/homepageExperience/components/steps/java/ExecuteQuerySql.tsx
@@ -82,9 +82,7 @@ AND ('bees' IS NOT NULL OR 'ants' IS NOT NULL) order by time asc`
--add-opens=java.base/java.nio=ALL-UNNAMED
Java
-
- This can be done with an environment variable:
-