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/10/29 20:44:53 UTC

[GitHub] [helix] zhangmeng916 commented on a change in pull request #1494: Add admin and Rest API to purge instances that have been offline more than specified period of time

zhangmeng916 commented on a change in pull request #1494:
URL: https://github.com/apache/helix/pull/1494#discussion_r514555208



##########
File path: helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixAdmin.java
##########
@@ -2061,4 +2070,45 @@ public ZKHelixAdmin build() {
               _zkAddress), false);
     }
   }
+
+  private Map<String, InstanceConfig> findTimeoutOfflineInstances(String clusterName,
+      Map<String, String> customizedPurgeMap) {
+    String timeout = customizedPurgeMap.get(OFFLINE_NODE_PURGE_TIMEOUT);
+    Long timeoutValue;
+    // in case there is no customized timeout value, use the one defined in cluster config
+    if (timeout == null) {
+      timeoutValue = _configAccessor.getClusterConfig(clusterName).getOfflineNodeTimeOutForPurge();
+    } else {
+      timeoutValue = Long.valueOf(timeout);

Review comment:
       With the input changed to Long, now it's not an issue.




----------------------------------------------------------------
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