git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Logging metrics from within Elasticsearch ActionRequestFailureHandler


Hi Averell,

I am afraid this is currently not possible without modifying
ElasticsearchSink. Would you like to open jira ticket for metrics access
in the failureHandler?

Best,

Dawid


On 13/09/18 03:50, Averell wrote:
> 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,
> Averell
>
>
>
>
>
> --
> Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/


Attachment: signature.asc
Description: OpenPGP digital signature