asafm commented on code in PR #20498:
URL: https://github.com/apache/pulsar/pull/20498#discussion_r1221737192
##########
pulsar-io/elastic-search/src/main/java/org/apache/pulsar/io/elasticsearch/ElasticSearchSink.java:
##########
@@ -123,12 +124,18 @@ public void write(Record<GenericObject> record) throws
Exception {
elasticsearchClient.bulkDelete(record,
idAndDoc.getLeft());
} else {
elasticsearchClient.deleteDocument(record,
idAndDoc.getLeft());
+
elasticsearchClient.incrementCounter(ElasticSearchClient.METRICS_TOTAL_SUCCESS,
1);
+
elasticsearchClient.incrementCounter(ElasticSearchClient.METRICS_TOTAL_DELETE,
1);
}
+ } else {
+
elasticsearchClient.incrementCounter(ElasticSearchClient.METRICS_TOTAL_SKIP, 1);
}
break;
case IGNORE:
+
elasticsearchClient.incrementCounter(ElasticSearchClient.METRICS_TOTAL_NULLVALUE_IGNORE,
1);
break;
case FAIL:
+
elasticsearchClient.incrementCounter(ElasticSearchClient.METRICS_TOTAL_FAILURE,
1);
Review Comment:
You're correct. That's super strange method :)
--
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]