public class WasbRemoteCallHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOG |
static int |
REMOTE_CALL_SUCCESS_CODE
Return code when the remote call is successful.
|
| Constructor and Description |
|---|
WasbRemoteCallHelper(org.apache.hadoop.io.retry.RetryPolicy retryPolicy) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.http.client.methods.HttpUriRequest |
getHttpRequest(String[] urls,
String path,
List<org.apache.http.NameValuePair> queryParams,
int urlIndex,
String httpMethod,
boolean requiresNewAuth) |
String |
makeRemoteRequest(String[] urls,
String path,
List<org.apache.http.NameValuePair> queryParams,
String httpMethod)
Helper method to make remote HTTP Get request.
|
protected String |
retryableRequest(String[] urls,
String path,
List<org.apache.http.NameValuePair> queryParams,
String httpMethod) |
void |
updateHttpClient(org.apache.http.client.HttpClient client) |
public static final org.slf4j.Logger LOG
public static final int REMOTE_CALL_SUCCESS_CODE
public WasbRemoteCallHelper(org.apache.hadoop.io.retry.RetryPolicy retryPolicy)
public void updateHttpClient(org.apache.http.client.HttpClient client)
public String makeRemoteRequest(String[] urls, String path, List<org.apache.http.NameValuePair> queryParams, String httpMethod) throws IOException
urls - - Service urls to be used, if one fails try another.path - - URL endpoint for the resource.queryParams - - list of query parametershttpMethod - - http Method to be used.IOException - when there an error in executing the remote http request.protected String retryableRequest(String[] urls, String path, List<org.apache.http.NameValuePair> queryParams, String httpMethod) throws IOException
IOExceptionprotected org.apache.http.client.methods.HttpUriRequest getHttpRequest(String[] urls, String path, List<org.apache.http.NameValuePair> queryParams, int urlIndex, String httpMethod, boolean requiresNewAuth) throws URISyntaxException, IOException
URISyntaxExceptionIOExceptionCopyright © 2008–2020 Apache Software Foundation. All rights reserved.