Repository: beam Updated Branches: refs/heads/master b83300682 -> 8f9f5f1a6
Rephrases messages on RetryHttpRequestInitializer "will NOT retry" messages are confusing some customers into thinking that an entire high-level operation inside a Beam job, involving this request as an implementation detail, will not be retried (e.g. a BigQuery import etc.) In reality there's many levels of retries and RetryHttpRequestInitializer can not be aware of them. Retrying at a higher level may or may not happen, and it's up to higher-level components to log that (they usually do). Project: http://git-wip-us.apache.org/repos/asf/beam/repo Commit: http://git-wip-us.apache.org/repos/asf/beam/commit/be3c39f0 Tree: http://git-wip-us.apache.org/repos/asf/beam/tree/be3c39f0 Diff: http://git-wip-us.apache.org/repos/asf/beam/diff/be3c39f0 Branch: refs/heads/master Commit: be3c39f06521f9c5c5500be66688fc17e3680e25 Parents: b833006 Author: Eugene Kirpichov <[email protected]> Authored: Tue May 30 14:16:22 2017 -0700 Committer: Luke Cwik <[email protected]> Committed: Thu Jun 1 08:18:36 2017 -0700 ---------------------------------------------------------------------- .../beam/sdk/util/RetryHttpRequestInitializer.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/beam/blob/be3c39f0/sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/util/RetryHttpRequestInitializer.java ---------------------------------------------------------------------- diff --git a/sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/util/RetryHttpRequestInitializer.java b/sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/util/RetryHttpRequestInitializer.java index 2b7135e..e5b48d3 100644 --- a/sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/util/RetryHttpRequestInitializer.java +++ b/sdks/java/extensions/google-cloud-platform-core/src/main/java/org/apache/beam/sdk/util/RetryHttpRequestInitializer.java @@ -73,7 +73,9 @@ public class RetryHttpRequestInitializer implements HttpRequestInitializer { if (willRetry) { LOG.debug("Request failed with IOException, will retry: {}", request.getUrl()); } else { - LOG.warn("Request failed with IOException, will NOT retry: {}", request.getUrl()); + LOG.warn( + "Request failed with IOException (caller responsible for retrying): {}", + request.getUrl()); } return willRetry; } @@ -105,12 +107,14 @@ public class RetryHttpRequestInitializer implements HttpRequestInitializer { boolean supportsRetry) throws IOException { boolean retry = handler.handleResponse(request, response, supportsRetry); if (retry) { - LOG.debug("Request failed with code {} will retry: {}", + LOG.debug("Request failed with code {}, will retry: {}", response.getStatusCode(), request.getUrl()); } else if (!ignoredResponseCodes.contains(response.getStatusCode())) { - LOG.warn("Request failed with code {}, will NOT retry: {}", - response.getStatusCode(), request.getUrl()); + LOG.warn( + "Request failed with code {} (caller responsible for retrying): {}", + response.getStatusCode(), + request.getUrl()); } return retry;
