@@ -26,7 +26,7 @@ resulting errors see [this section.](#synchronous-writes)
26
26
``` java
27
27
InfluxDB influxDB = InfluxDBFactory . connect(" http://172.17.0.2:8086" , " root" , " root" );
28
28
String dbName = " aTimeSeries" ;
29
- influxDB. createDatabase( dbName);
29
+ influxDB. query( new Query ( " CREATE DATABASE " + dbName, " " ) );
30
30
influxDB. setDatabase(dbName);
31
31
String rpName = " aRetentionPolicy" ;
32
32
influxDB. createRetentionPolicy(rpName, dbName, " 30d" , " 30m" , 2 , true );
@@ -86,7 +86,7 @@ If your points are written into different databases and retention policies, the
86
86
``` java
87
87
InfluxDB influxDB = InfluxDBFactory . connect(" http://172.17.0.2:8086" , " root" , " root" );
88
88
String dbName = " aTimeSeries" ;
89
- influxDB. createDatabase( dbName);
89
+ influxDB. query( new Query ( " CREATE DATABASE " + dbName, " " ) );
90
90
String rpName = " aRetentionPolicy" ;
91
91
influxDB. createRetentionPolicy(rpName, dbName, " 30d" , " 30m" , 2 , true );
92
92
@@ -121,7 +121,7 @@ If you want to write the data points immediately to InfluxDB (and handle the err
121
121
``` java
122
122
InfluxDB influxDB = InfluxDBFactory . connect(" http://172.17.0.2:8086" , " root" , " root" );
123
123
String dbName = " aTimeSeries" ;
124
- influxDB. createDatabase( dbName);
124
+ influxDB. query( new Query ( " CREATE DATABASE " + dbName, " " ) );
125
125
String rpName = " aRetentionPolicy" ;
126
126
influxDB. createRetentionPolicy(rpName, dbName, " 30d" , " 30m" , 2 , true );
127
127
@@ -333,7 +333,7 @@ To solve this situation the influxdb-java offers an option to offset the flushDu
333
333
the clients will flush their buffers in different intervals:
334
334
335
335
``` java
336
- influxDB. enableBatch(BatchOptions . DEFAULTS. jitterDuration(500 );
336
+ influxDB. enableBatch(BatchOptions . DEFAULTS. jitterDuration(500 )) ;
337
337
```
338
338
339
339
### Other Usages
0 commit comments