You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/05/20 21:28:48 UTC

[GitHub] [helix] dasahcc commented on a change in pull request #1013: Add timeout for stoppable post request

dasahcc commented on a change in pull request #1013:
URL: https://github.com/apache/helix/pull/1013#discussion_r428317429



##########
File path: helix-rest/src/main/java/org/apache/helix/rest/client/CustomRestClientFactory.java
##########
@@ -32,26 +37,32 @@
  */
 public class CustomRestClientFactory {
   private static final Logger LOG = LoggerFactory.getLogger(CustomRestClientFactory.class);
-
   private static CustomRestClient INSTANCE = null;
 
-  private CustomRestClientFactory() {
+  protected CustomRestClientFactory() {
   }
 
   public static CustomRestClient get() {
     if (INSTANCE == null) {
       synchronized (CustomRestClientFactory.class) {
         if (INSTANCE == null) {
           try {
+            // Here int has been used for timeout value because setConnectTimeout,
+            // setConnectionRequestTimeout and setSocketTimeout are getting int as input
+            final int httpRequestTimeout =
+                HelixUtil.getSystemPropertyAsInt(RestSystemPropertyKeys.HTTP_TIMEOUT_MS, 60 * 1000);

Review comment:
       Let's put this number to some constant file or at least to be a variable




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org