spring-data-influxdb icon indicating copy to clipboard operation
spring-data-influxdb copied to clipboard

thes properties is not found 'enableBatch'

Open gumutianqi opened this issue 6 years ago • 2 comments

the properties is not found 'enableBatch' configuration

gumutianqi avatar Jan 11 '19 07:01 gumutianqi

Hey @gumutianqi, atm it's not clear to me what do you mean. However, to write batches to the database you could use the following template method: public void write(final List<T> payload).

Cheers Michael

miwurster avatar Jan 17 '19 17:01 miwurster

I'm sorry,my problem, in the file InfluxDBProperties.java, not found the about the enableBatch configuration, this config properties is not write batches, that like Delay batch write

this is global configuration, so should Configuration to InfluxDBProperties.java

as code:

InfluxDB influxDB = InfluxDBFactory.connect(influxUrl, influxUser, influxPassword);
influxDB.setDatabase(dbName);
influxDB.setRetentionPolicy("autogen");

// influxdb enableBatch  // Flush every 2000 Points, at least every 100ms
influxDB.enableBatch(2000, 100, TimeUnit.MILLISECONDS);

influxDB.write(...)
....

gumutianqi avatar Jan 21 '19 03:01 gumutianqi