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/08/02 06:54:47 UTC

[GitHub] [helix] pkuwm commented on a change in pull request #1197: Support option to skip direct ZK read for health check API

pkuwm commented on a change in pull request #1197:
URL: https://github.com/apache/helix/pull/1197#discussion_r464035621



##########
File path: helix-rest/src/main/java/org/apache/helix/rest/common/HelixDataAccessorWrapper.java
##########
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import com.google.common.annotations.VisibleForTesting;

Review comment:
       Not used in this file?

##########
File path: helix-rest/src/main/java/org/apache/helix/rest/common/HelixDataAccessorWrapper.java
##########
@@ -64,22 +65,38 @@ public HelixDataAccessorWrapper(ZKHelixDataAccessor dataAccessor) {
     _restClient = CustomRestClientFactory.get();
   }
 
+  public HelixDataAccessorWrapper(ZKHelixDataAccessor dataAccessor, CustomRestClient customRestClient) {

Review comment:
       Could it use Interface instead: `ZKHelixDataAccessor` -> `HelixDataAccessor`?

##########
File path: helix-rest/src/main/java/org/apache/helix/rest/server/resources/helix/InstancesAccessor.java
##########
@@ -172,7 +172,7 @@ public Response instancesOperations(@PathParam("clusterId") String clusterId,
         admin.enableInstance(clusterId, enableInstances, false);
         break;
       case stoppable:
-        return batchGetStoppableInstances(clusterId, node);
+        return batchGetStoppableInstances(clusterId, node, Boolean.valueOf(skipZKRead));

Review comment:
       Nit: since parameter is `boolean` type, `Boolean.valueOf` -> `Boolean.parseBoolean()`?

##########
File path: helix-rest/src/test/java/org/apache/helix/rest/server/TestPerInstanceAccessor.java
##########
@@ -33,9 +33,15 @@
 
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
+import org.apache.helix.ConfigAccessor;
 import org.apache.helix.HelixDataAccessor;
 import org.apache.helix.HelixException;
 import org.apache.helix.TestHelper;
+import org.apache.helix.model.RESTConfig;

Review comment:
       Remove these unused imports?




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