You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I understand right we must aggregate Points in advanced in order to use the batchapi properly.
BatchPoints batchPoints = BatchPoints.database(influxDatabase).build();
for (Point point : points) {
batchPoints.point(point);
}
influxDB.write(batchPoints);
That mean I need to have a 'batching' logic that collect points and then every once in a while I need to use batchPoints.point(point) (the way I used above) to actually submit them.
Cant we just submit single points using batchPoints.point and relay on the batchingapi that every X time will do the insertion to the database?
thanks.
The text was updated successfully, but these errors were encountered:
If I understand right we must aggregate Points in advanced in order to use the batchapi properly.
Nope, you are mixing a bit the concepts. I would suggest you to keep things simple and make use of the available batch processor (i.e. don't use the class BatchPoints).
You must follow the same example that you provided 16 days ago here but paying attention to the fact that if you query before the batch processor was executed, you won't receive the last added points.
As explained on that thread, you have two ways to get the most recent data: wait more than 100ms (100ms was the value you passed as parameter) or force a flush by calling influxdb.flush().
If this solves your problem, could you please close this issue?
If I understand right we must aggregate Points in advanced in order to use the batchapi properly.
BatchPoints batchPoints = BatchPoints.database(influxDatabase).build();
for (Point point : points) {
batchPoints.point(point);
}
influxDB.write(batchPoints);
That mean I need to have a 'batching' logic that collect points and then every once in a while I need to use batchPoints.point(point) (the way I used above) to actually submit them.
Cant we just submit single points using batchPoints.point and relay on the batchingapi that every X time will do the insertion to the database?
thanks.
The text was updated successfully, but these errors were encountered: