Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added InfluxDB.flush() and consistency level can be configured for batching #290

Closed

Conversation

jganoff
Copy link
Contributor

@jganoff jganoff commented Feb 27, 2017

This addresses a couple requested enhancements described in #289. Specifically:

  1. InfluxDB.flush() was introduced as a mechanism for flushing the underlying BatchProcessor without shutting it down. It's a step toward being able to guarantee all asynchronously queued points are delivered at a given time when operating in batch mode. This doesn't change the failure handling for BatchProcessor.write() so records may still be silently dropped as a result of flushing.
  2. The consistently level can be configured for asynchronous writes. The default was not changed and is still ONE. It can be explicitly set via InfluxDB.enableBatch(int, int, TimeUnit, ConsistencyLevel).

@codecov-io
Copy link

codecov-io commented Feb 27, 2017

Codecov Report

Merging #290 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master     #290      +/-   ##
============================================
+ Coverage     78.47%   78.47%   +<.01%     
- Complexity      130      133       +3     
============================================
  Files            11       11              
  Lines           706      720      +14     
  Branches         77       77              
============================================
+ Hits            554      565      +11     
- Misses          109      112       +3     
  Partials         43       43
Impacted Files Coverage Δ Complexity Δ
src/main/java/org/influxdb/InfluxDB.java 100% <ø> (ø) 0 <0> (ø)
...rc/main/java/org/influxdb/impl/BatchProcessor.java 98.05% <100%> (+0.14%) 17 <1> (+1)
src/main/java/org/influxdb/impl/InfluxDBImpl.java 79.8% <100%> (-0.79%) 41 <4> (+2)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 46c29a3...cce2c9b. Read the comment docs.

@jganoff jganoff force-pushed the feature-289-batch-enhancements branch from 9e0be1e to cce2c9b Compare February 27, 2017 22:21
@majst01
Copy link
Collaborator

majst01 commented Feb 28, 2017

Hi @jganoff

this is a good start, but i want to seperate these 2 modification into 2 seperate PR's to make them easier to review and accept.

@jganoff
Copy link
Contributor Author

jganoff commented Feb 28, 2017

Sure, I'll split them and send an update.

@jganoff jganoff closed this Feb 28, 2017
@jganoff jganoff deleted the feature-289-batch-enhancements branch February 28, 2017 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants