zhangmeng916 commented on a change in pull request #698: Implement Azure cloud
instance information processor
URL: https://github.com/apache/helix/pull/698#discussion_r376122844
##########
File path:
helix-core/src/main/java/org/apache/helix/cloud/azure/AzureHttpUtil.java
##########
@@ -0,0 +1,45 @@
+package org.apache.helix.cloud.azure;
+
+import javax.net.ssl.SSLException;
+import org.apache.helix.HelixCloudProperty;
+import org.apache.http.client.HttpRequestRetryHandler;
+import org.apache.http.client.config.RequestConfig;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.protocol.HttpContext;
+
+import java.io.IOException;
+import java.io.InterruptedIOException;
+import java.net.UnknownHostException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A dedicated http client for retrieving information from Azure Instance
Metadata Service
+ */
+class AzureHttpUtil {
Review comment:
Actually I double checked and found that I can just remove the util
function. The processor itself can just directly make the http call, and
passing the information it needs to pass. So the future usage should be, any
class that needs to make the call would directly call getHttpClient, providing
whatever config they would like to pass in.
For example, in current AzureCloudInstanceInfoProcessor, we only need to
pass requestConfig and retryHandler. Other class may need something like
"setConnectionBackoffStrategy" etc. Users can use whatever is available in the
http client parameters.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]