@@ -26,7 +26,7 @@ resulting errors see [this section.](#synchronous-writes)
2626``` java
2727InfluxDB influxDB = InfluxDBFactory . connect(" http://172.17.0.2:8086" , " root" , " root" );
2828String dbName = " aTimeSeries" ;
29- influxDB. createDatabase( dbName);
29+ influxDB. query( new Query ( " CREATE DATABASE " + dbName, " " ) );
3030influxDB. setDatabase(dbName);
3131String rpName = " aRetentionPolicy" ;
3232influxDB. createRetentionPolicy(rpName, dbName, " 30d" , " 30m" , 2 , true );
@@ -86,7 +86,7 @@ If your points are written into different databases and retention policies, the
8686``` java
8787InfluxDB influxDB = InfluxDBFactory . connect(" http://172.17.0.2:8086" , " root" , " root" );
8888String dbName = " aTimeSeries" ;
89- influxDB. createDatabase( dbName);
89+ influxDB. query( new Query ( " CREATE DATABASE " + dbName, " " ) );
9090String rpName = " aRetentionPolicy" ;
9191influxDB. createRetentionPolicy(rpName, dbName, " 30d" , " 30m" , 2 , true );
9292
@@ -121,7 +121,7 @@ If you want to write the data points immediately to InfluxDB (and handle the err
121121``` java
122122InfluxDB influxDB = InfluxDBFactory . connect(" http://172.17.0.2:8086" , " root" , " root" );
123123String dbName = " aTimeSeries" ;
124- influxDB. createDatabase( dbName);
124+ influxDB. query( new Query ( " CREATE DATABASE " + dbName, " " ) );
125125String rpName = " aRetentionPolicy" ;
126126influxDB. createRetentionPolicy(rpName, dbName, " 30d" , " 30m" , 2 , true );
127127
@@ -333,7 +333,7 @@ To solve this situation the influxdb-java offers an option to offset the flushDu
333333the clients will flush their buffers in different intervals:
334334
335335``` java
336- influxDB. enableBatch(BatchOptions . DEFAULTS. jitterDuration(500 );
336+ influxDB. enableBatch(BatchOptions . DEFAULTS. jitterDuration(500 )) ;
337337```
338338
339339### Other Usages
0 commit comments