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
flush
method for BulkProcessor class.
#5575
Conversation
I think you should add a test in addition to it in |
Added a test case and doc string for method. |
I looked at it quickly and I think you should check if we really need to flush ie. if if (closed) {
throw new XZYException("already closed");
} into a separate method called |
Hi @kul Thanks. |
assertThat("Could not get a bulk response even after an explicit flush.", response, is(notNullValue())); | ||
assertThat(response.getItems().length, is(5)); | ||
} finally { | ||
if (processor != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use IOUtils.close(processor)
it deals with null
values...
I left small comments on the test, just style :) LGTM can you squash the commits and rebase? @dadoonet can you take it form here? |
made the changes and squashed commits. Also made BulkProcessor class implement Closeable. |
Pushed in 1.x and master. Thanks! |
This is for #5570.
There is no explicit method
flush/execute
in BulkProcessor class. This can be useful in certain scenarios. Currently it requires to close and create a new BulkProcessor if one wants an immediate flush.