fabriziofortino commented on code in PR #1193:
URL: https://github.com/apache/jackrabbit-oak/pull/1193#discussion_r1389132225
##########
oak-search-elastic/src/main/java/org/apache/jackrabbit/oak/plugins/index/elastic/index/ElasticBulkProcessorHandler.java:
##########
@@ -205,39 +205,33 @@ public boolean close() throws IOException {
return updatesMap.containsValue(Boolean.TRUE);
}
- private class OakBulkProcessorListener implements BulkProcessor.Listener {
+ private class OAKBulkListener implements BulkListener<String> {
@Override
- public void beforeBulk(long executionId, BulkRequest bulkRequest) {
+ public void beforeBulk(long executionId, BulkRequest request,
List<String> contexts) {
// register new bulk party
phaser.register();
// init update status
updatesMap.put(executionId, Boolean.FALSE);
- bulkRequest.timeout(TimeValue.timeValueMinutes(2));
-
- LOG.debug("Sending bulk with id {} -> {}", executionId,
bulkRequest.getDescription());
+ LOG.debug("Sending bulk with id {} -> {}", executionId, contexts);
if (LOG.isTraceEnabled()) {
- LOG.trace("Bulk Requests: \n{}", bulkRequest.requests()
+ LOG.trace("Bulk Requests: \n{}", request.operations()
.stream()
- .map(DocWriteRequest::toString)
+ .map(BulkOperation::toString)
.collect(Collectors.joining("\n"))
);
}
}
@Override
- public void afterBulk(long executionId, BulkRequest bulkRequest,
BulkResponse bulkResponse) {
- LOG.debug("Bulk with id {} processed with status {} in {}",
executionId, bulkResponse.status(), bulkResponse.getTook());
+ public void afterBulk(long executionId, BulkRequest request,
List<String> contexts, co.elastic.clients.elasticsearch.core.BulkResponse
response) {
Review Comment:
leftover from the migration since both clients contain a `BulkResponse`
class.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]