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/10 19:13:36 UTC

[GitHub] [helix] narendly opened a new pull request #1243: Make HelixCustomCodeRunner multi-ZK aware

narendly opened a new pull request #1243:
URL: https://github.com/apache/helix/pull/1243


   ### Issues
   
   - [x] My PR addresses the following Helix issues and references them in the PR description:
   
   Fixes #1242
   
   ### Description
   
   - [ ] Here are some details about my PR, including screenshots of any UI changes:
   
   This class was an edge case that was neglected as part of ZooScalability API migration. This commit makes HelixCustomCodeRunner realm-aware by adding a constructor that accepts a RealmAwareZkConnectionConfig.
   
   ### Tests
   
   - [ ] The following tests are written for this issue:
   
   (List the names of added unit/integration tests)
   
   - [ ] The following is the result of the "mvn test" command on the appropriate module:
   
   (Before CI test pass, please copy & paste the result of "mvn test")
   
   ### Documentation (Optional)
   
   - In case of new functionality, my PR adds documentation in the following wiki page:
   
   (Link the GitHub wiki you added)
   
   ### Commits
   
   - My commits all reference appropriate Apache Helix GitHub issues in their subject lines. In addition, my commits follow the guidelines from "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Code Quality
   
   - My diff has been formatted using helix-style.xml 
   (helix-style-intellij.xml if IntelliJ IDE is used)
   


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


[GitHub] [helix] narendly commented on pull request #1243: Make HelixCustomCodeRunner multi-ZK aware

Posted by GitBox <gi...@apache.org>.
narendly commented on pull request #1243:
URL: https://github.com/apache/helix/pull/1243#issuecomment-671658853


   This PR is ready to be merged.


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


[GitHub] [helix] narendly merged pull request #1243: Make HelixCustomCodeRunner multi-ZK aware

Posted by GitBox <gi...@apache.org>.
narendly merged pull request #1243:
URL: https://github.com/apache/helix/pull/1243


   


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


[GitHub] [helix] dasahcc commented on a change in pull request #1243: Make HelixCustomCodeRunner multi-ZK aware

Posted by GitBox <gi...@apache.org>.
dasahcc commented on a change in pull request #1243:
URL: https://github.com/apache/helix/pull/1243#discussion_r468181491



##########
File path: helix-core/src/main/java/org/apache/helix/participant/HelixCustomCodeRunner.java
##########
@@ -130,14 +147,23 @@ public void start() throws Exception {
 
     StateMachineEngine stateMach = _manager.getStateMachineEngine();
     stateMach.registerStateModelFactory(LEADER_STANDBY, _stateModelFty, _resourceName);
-    HelixZkClient zkClient = null;
+    RealmAwareZkClient zkClient = null;
     try {
       // manually add ideal state for participant leader using LeaderStandby
       // model
-      HelixZkClient.ZkClientConfig clientConfig = new HelixZkClient.ZkClientConfig();
-      clientConfig.setZkSerializer(new ZNRecordSerializer());
-      zkClient = SharedZkClientFactory.getInstance()
-          .buildZkClient(new HelixZkClient.ZkConnectionConfig(_zkAddr), clientConfig);
+      if (Boolean.getBoolean(SystemPropertyKeys.MULTI_ZK_ENABLED) || _zkAddr == null) {

Review comment:
       if zkaddress is null and we are initialize it with FederatedZKClient, do we have problem? For example, we cannot get the routing key and cause any problems?




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


[GitHub] [helix] narendly commented on a change in pull request #1243: Make HelixCustomCodeRunner multi-ZK aware

Posted by GitBox <gi...@apache.org>.
narendly commented on a change in pull request #1243:
URL: https://github.com/apache/helix/pull/1243#discussion_r468191812



##########
File path: helix-core/src/main/java/org/apache/helix/participant/HelixCustomCodeRunner.java
##########
@@ -130,14 +147,23 @@ public void start() throws Exception {
 
     StateMachineEngine stateMach = _manager.getStateMachineEngine();
     stateMach.registerStateModelFactory(LEADER_STANDBY, _stateModelFty, _resourceName);
-    HelixZkClient zkClient = null;
+    RealmAwareZkClient zkClient = null;
     try {
       // manually add ideal state for participant leader using LeaderStandby
       // model
-      HelixZkClient.ZkClientConfig clientConfig = new HelixZkClient.ZkClientConfig();
-      clientConfig.setZkSerializer(new ZNRecordSerializer());
-      zkClient = SharedZkClientFactory.getInstance()
-          .buildZkClient(new HelixZkClient.ZkConnectionConfig(_zkAddr), clientConfig);
+      if (Boolean.getBoolean(SystemPropertyKeys.MULTI_ZK_ENABLED) || _zkAddr == null) {

Review comment:
       The whole point of FederatedZkClient is not using a particular ZkAddress, but rather rely on RealmAwareConnectionConfig to establish a multi-zk connection, so this makes sense. The sharding key information is included in the connection config.




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