Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
j.hoerdt
sensor2graph
Commits
8380bbe2
Commit
8380bbe2
authored
Nov 23, 2021
by
neop
Browse files
add gobal write_api
parent
40224458
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/sensor2graph/Main.java
View file @
8380bbe2
...
...
@@ -48,6 +48,7 @@ public class Main {
public
static
Driver
driver
;
public
static
InfluxDBClient
influxDBClient
;
public
static
WriteApi
influxdb_write_api
;
public
static
String
handle_registry_session_id
;
public
static
java
.
util
.
logging
.
Logger
glogger
;
private
static
java
.
util
.
logging
.
Logger
logger
;
...
...
@@ -93,6 +94,8 @@ public class Main {
)
.
build
()
).
enableGzip
();
influxdb_write_api
=
influxDBClient
.
makeWriteApi
();
}
private
static
Set
<
String
>
parse_line_separated_values_file
(
String
fname
)
throws
Exception
{
...
...
@@ -110,7 +113,7 @@ public class Main {
private
static
void
run
()
throws
Exception
{
System
.
out
.
println
(
"starting influx query"
);
var
tables
=
influxDBClient
.
getQueryApi
().
query
(
"from(bucket:\"openforecast\") |> range(start: -600d1
m
, stop: -600d)"
);
var
tables
=
influxDBClient
.
getQueryApi
().
query
(
"from(bucket:\"openforecast\") |> range(start: -600d1
h
, stop: -600d)
|> limit(100)
"
);
for
(
var
fluxTable
:
tables
)
{
System
.
out
.
println
(
"table "
+
fluxTable
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment