You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by "Ravi Pathak (JIRA)" <ji...@apache.org> on 2018/08/02 13:32:00 UTC
[jira] [Comment Edited] (BEAM-3026) Improve retrying in
ElasticSearch client
[ https://issues.apache.org/jira/browse/BEAM-3026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16566791#comment-16566791 ]
Ravi Pathak edited comment on BEAM-3026 at 8/2/18 1:31 PM:
-----------------------------------------------------------
Hi [~timrobertson100],
Do we prefer same calls as SolrIO which uses RetryConfig instead of retryWithWaitStrategy and retryWithStopStrategy ?
{code:java}
ElasticSearchIO.write().withConnectionConfiguration(connectionConfiguration).withRetryConfiguration(RetryConfiguration.create(3, Duration.standardMinutes(3)).withRetryPredicate()).to("test-index");{code}
was (Author: aalbatross):
Hi [~timrobertson100],
Do we prefer same calls as SolrIO which uses RetryConfig instead of retryWithWaitStrategy and retryWithStopStrategy ?
ElasticSearchIO.write().withConnectionConfiguration(connectionConfiguration).withRetryConfiguration(RetryConfiguration.create(3, Duration.standardMinutes(3)).withRetryPredicate()).to("test-index");
> 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)