beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Robertson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BEAM-3026) Improve retrying in ElasticSearch client
Date Thu, 02 Aug 2018 14:37:00 GMT

    [ https://issues.apache.org/jira/browse/BEAM-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16566886#comment-16566886
] 

Tim Robertson commented on BEAM-3026:
-------------------------------------

Thanks for checking [~aalbatross] - things did evolved from the original idea proposed on
this jira. I would suggest mirroring as close as possible the `SolrIO`.  An overarching goal
in Beam IO is to aim for consistency/familiarity 

If I remember correctly in ES, retrying is supported but not for `429` responses whereas
in Solr we needed to handle a multitude of various exceptions. 

> Improve retrying in ElasticSearch client
> ----------------------------------------
>
>                 Key: BEAM-3026
>                 URL: https://issues.apache.org/jira/browse/BEAM-3026
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-elasticsearch
>            Reporter: Tim Robertson
>            Assignee: Ravi Pathak
>            Priority: Major
>
> Currently an overloaded ES server will result in clients failing fast.
> I suggest implementing backoff pauses.  Perhaps something like this:
> {code}
>     ElasticsearchIO.ConnectionConfiguration conn = ElasticsearchIO.ConnectionConfiguration
>       .create(new String[]{"http://...:9200"}, "test", "test")
>       .retryWithWaitStrategy(WaitStrategies.exponentialBackoff(1000, TimeUnit.MILLISECONDS)
>       .retryWithStopStrategy(StopStrategies.stopAfterAttempt(10)
>     );
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message