forked from D-Net/dnet-hadoop
HttpClient used in metadata collection retries on 502, 503, 504
This commit is contained in:
parent
67afd06cd1
commit
af42377d0e
|
@ -142,9 +142,10 @@ public class HttpConnector2 {
|
||||||
throw new CollectorException("4xx error: request will not be repeated. " + report);
|
throw new CollectorException("4xx error: request will not be repeated. " + report);
|
||||||
}
|
}
|
||||||
if (is5xx(urlConn.getResponseCode())) {
|
if (is5xx(urlConn.getResponseCode())) {
|
||||||
// SERVER SIDE ERRORS RETRY ONLY on 503
|
|
||||||
switch (urlConn.getResponseCode()) {
|
switch (urlConn.getResponseCode()) {
|
||||||
|
case HttpURLConnection.HTTP_BAD_GATEWAY:
|
||||||
case HttpURLConnection.HTTP_UNAVAILABLE:
|
case HttpURLConnection.HTTP_UNAVAILABLE:
|
||||||
|
case HttpURLConnection.HTTP_GATEWAY_TIMEOUT:
|
||||||
if (retryAfter > 0) {
|
if (retryAfter > 0) {
|
||||||
log
|
log
|
||||||
.warn(
|
.warn(
|
||||||
|
|
Loading…
Reference in New Issue