Commit 8380bbe2 authored by neop's avatar neop
Browse files

add gobal write_api

parent 40224458
......@@ -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: -600d1m, stop: -600d)");
var tables = influxDBClient.getQueryApi().query("from(bucket:\"openforecast\") |> range(start: -600d1h, stop: -600d) |> limit(100)");
for (var fluxTable : tables) {
System.out.println("table " + fluxTable);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment