Logging metrics from within Elasticsearch ActionRequestFailureHandler
Good day everyone,
I'm writing to Elasticsearch, and I need to count the number of records that
the process failed to write. The problem that I'm facing is there is no
RunningContext that I can access from within
o.a.f.s.c.elasticsearch.ActionRequestFailureHandler's onFailure method so
that I can trigger getMetricGroup method.
What can I do in this case?
I see one option in rewriting ElasticsearchSink/ElasticsearchSink.Builder,
to override ElasticsearchSinkBase.open() method. But it looks like too much
boilerplate code - the designer of ElasticsearchSink.Builder must have had
some better solution.
Thanks and best regards,
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/