You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by "zpinto (via GitHub)" <gi...@apache.org> on 2023/05/19 09:57:15 UTC

[GitHub] [helix] zpinto opened a new pull request, #2497: Add support for pluggable external CloudInfoProcessor and CustomizedCloudProperties

zpinto opened a new pull request, #2497:
URL: https://github.com/apache/helix/pull/2497

   Add support for pluggable external CloudInfoProcessor and CustomizedCloudProperties.
   
   ### Issues
   
   - [ ] My PR addresses the following Helix issues and references them in the PR description:
   
   (#200 - Link your issue number here: You can write "Fixes #XXX". Please use the proper keyword so that the issue gets closed automatically. See https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue
   Any of the following keywords can be used: close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved)
   
   ### Description
   
   - [ ] Here are some details about my PR, including screenshots of any UI changes:
   
   (Write a concise description including what, why, how)
   
   ### 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:
   
   (If CI test fails due to known issue, please specify the issue and test PR locally. Then copy & paste the result of "mvn test" to here.)
   
   ### Changes that Break Backward Compatibility (Optional)
   
   - My PR contains changes that break backward compatibility or previous assumptions for certain methods or API. They include:
   
   (Consider including all behavior changes for public methods or API. Also include these changes in merge description so that other developers are aware of these changes. This allows them to make relevant code changes in feature branches accounting for the new method/API behavior.)
   
   ### 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.

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org

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] zpinto commented on a diff in pull request #2497: Add support for pluggable external CloudInfoProcessor and CustomizedCloudProperties

Posted by "zpinto (via GitHub)" <gi...@apache.org>.
zpinto commented on code in PR #2497:
URL: https://github.com/apache/helix/pull/2497#discussion_r1227328949


##########
helix-core/src/main/java/org/apache/helix/HelixCloudProperty.java:
##########
@@ -185,10 +213,20 @@ public void setCloudInfoSources(List<String> sources) {
     _cloudInfoSources = sources;
   }
 
+  @Deprecated
   public void setCloudInfoProcessorName(String cloudInfoProcessorName) {
     _cloudInfoProcessorName = cloudInfoProcessorName;
   }
 
+  /**
+   * Set the fully qualified class name of the cloud info processor.
+   * @param cloudInfoProcessorFullyQualifiedClassName
+   */
+  public void setCloudInfoProcessorFullyQualifiedClassName(

Review Comment:
   Made this private instead.



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

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org

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] zpinto commented on a diff in pull request #2497: Add support for pluggable external CloudInfoProcessor and CustomizedCloudProperties

Posted by "zpinto (via GitHub)" <gi...@apache.org>.
zpinto commented on code in PR #2497:
URL: https://github.com/apache/helix/pull/2497#discussion_r1227326532


##########
helix-core/src/main/java/org/apache/helix/HelixCloudProperty.java:
##########
@@ -109,6 +116,9 @@ public void populateFieldsWithCloudConfig(CloudConfig cloudConfig) {
           setCloudInfoSources(
               Collections.singletonList(azureProperties.getProperty(CLOUD_INFO_SOURCE)));
           setCloudInfoProcessorName(azureProperties.getProperty(CLOUD_INFO_PROCESSOR_NAME));
+          setCloudInfoProcessorFullyQualifiedClassName(

Review Comment:
   I reformatted the code, with helix style. The formating here should have been from that as well based on my intellij settings.



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

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org

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] junkaixue commented on a diff in pull request #2497: Add support for pluggable external CloudInfoProcessor and CustomizedCloudProperties

Posted by "junkaixue (via GitHub)" <gi...@apache.org>.
junkaixue commented on code in PR #2497:
URL: https://github.com/apache/helix/pull/2497#discussion_r1220914035


##########
helix-core/src/test/java/org/apache/helix/integration/paticipant/CustomCloudInstanceInformationProcessor.java:
##########
@@ -0,0 +1,28 @@
+package org.apache.helix.integration.paticipant;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.helix.HelixCloudProperty;
+import org.apache.helix.api.cloud.CloudInstanceInformation;
+import org.apache.helix.api.cloud.CloudInstanceInformationProcessor;
+import org.apache.helix.cloud.azure.AzureCloudInstanceInformation;
+
+/**
+ * This is a custom implementation of CloudInstanceInformationProcessor.
+ * It is used to test the functionality of Helix node auto-registration.
+ */
+public class CustomCloudInstanceInformationProcessor implements CloudInstanceInformationProcessor<String> {
+  public CustomCloudInstanceInformationProcessor(HelixCloudProperty helixCloudProperty) {
+  }
+
+  @Override
+  public List<String> fetchCloudInstanceInformation() {
+    return Collections.singletonList("response");
+  }
+
+  @Override
+  public CloudInstanceInformation parseCloudInstanceInformation(List<String> responses) {
+    return new AzureCloudInstanceInformation.Builder().setFaultDomain("rack=A:123, host=").build();

Review Comment:
   If this is customized, why we use Azure's instanceinfo... This is a little confusing.



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

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org

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] zpinto commented on a diff in pull request #2497: Add support for pluggable external CloudInfoProcessor and CustomizedCloudProperties

Posted by "zpinto (via GitHub)" <gi...@apache.org>.
zpinto commented on code in PR #2497:
URL: https://github.com/apache/helix/pull/2497#discussion_r1227326532


##########
helix-core/src/main/java/org/apache/helix/HelixCloudProperty.java:
##########
@@ -109,6 +116,9 @@ public void populateFieldsWithCloudConfig(CloudConfig cloudConfig) {
           setCloudInfoSources(
               Collections.singletonList(azureProperties.getProperty(CLOUD_INFO_SOURCE)));
           setCloudInfoProcessorName(azureProperties.getProperty(CLOUD_INFO_PROCESSOR_NAME));
+          setCloudInfoProcessorFullyQualifiedClassName(

Review Comment:
   I reformatted the code, with helix style. The formatting here should have been from that as well based on my intellij settings.



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

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org

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] zpinto commented on a diff in pull request #2497: Add support for pluggable external CloudInfoProcessor and CustomizedCloudProperties

Posted by "zpinto (via GitHub)" <gi...@apache.org>.
zpinto commented on code in PR #2497:
URL: https://github.com/apache/helix/pull/2497#discussion_r1223732062


##########
helix-core/src/main/java/org/apache/helix/manager/zk/ParticipantManager.java:
##########
@@ -242,13 +242,17 @@ private CloudInstanceInformation getCloudInstanceInformation() {
         _helixManagerProperty.getHelixCloudProperty().getCloudInfoProcessorName();
     try {
       // fetch cloud instance information for the instance
-      String cloudInstanceInformationProcessorClassName = CLOUD_PROCESSOR_PATH_PREFIX
-          + _helixManagerProperty.getHelixCloudProperty().getCloudProvider().toLowerCase() + "."
-          + cloudInstanceInformationProcessorName;
+      String cloudInstanceInformationProcessorClassName =

Review Comment:
   Yes, you are correct. The logic to construct the fully qualified path does not really belong in `ParticipantManager`. I have moved this to `HelixCloudProperty` instead. 
   
   Based on the usage of `_cloudInfoProcessorName`, I also decided to deprecate that and create `_cloudInfoProcessorFullyQualifiedClassName`.
   
   Now `ParticipantManager` will just call `getCloudInfoProcessorFullyQualifiedClassName` and attempt to load the class.



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

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org

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] junkaixue commented on a diff in pull request #2497: Add support for pluggable external CloudInfoProcessor and CustomizedCloudProperties

Posted by "junkaixue (via GitHub)" <gi...@apache.org>.
junkaixue commented on code in PR #2497:
URL: https://github.com/apache/helix/pull/2497#discussion_r1220913286


##########
helix-core/src/main/java/org/apache/helix/manager/zk/ParticipantManager.java:
##########
@@ -242,13 +242,17 @@ private CloudInstanceInformation getCloudInstanceInformation() {
         _helixManagerProperty.getHelixCloudProperty().getCloudInfoProcessorName();
     try {
       // fetch cloud instance information for the instance
-      String cloudInstanceInformationProcessorClassName = CLOUD_PROCESSOR_PATH_PREFIX
-          + _helixManagerProperty.getHelixCloudProperty().getCloudProvider().toLowerCase() + "."
-          + cloudInstanceInformationProcessorName;
+      String cloudInstanceInformationProcessorClassName =

Review Comment:
   I dont get this... Originally, user configured it as "AZURE" will natively mapping to Azure impl. Then if they are using "CUSTOMIZED" they should be able to use any class path. 
   
   I understand what you are trying to do. But the branching of logic should be at the place selecting type instead of using path to do the selection.



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

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org

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] zpinto commented on a diff in pull request #2497: Add support for pluggable external CloudInfoProcessor and CustomizedCloudProperties

Posted by "zpinto (via GitHub)" <gi...@apache.org>.
zpinto commented on code in PR #2497:
URL: https://github.com/apache/helix/pull/2497#discussion_r1227326104


##########
helix-core/src/main/java/org/apache/helix/HelixCloudProperty.java:
##########
@@ -58,8 +59,13 @@ public class HelixCloudProperty {
   private List<String> _cloudInfoSources;
 
   // The name of the function that will fetch and parse cloud instance information.
+  @Deprecated

Review Comment:
   I decided to make a new attribute called `_cloudInfoProcessorPackage` and make `getCloudInfoProcessorFullyQualifiedClassName` return `_cloudInfoProcessorPackage + "." + _cloudInfoProcessorName`



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

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org

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] junkaixue commented on a diff in pull request #2497: Add support for pluggable external CloudInfoProcessor and CustomizedCloudProperties

Posted by "junkaixue (via GitHub)" <gi...@apache.org>.
junkaixue commented on code in PR #2497:
URL: https://github.com/apache/helix/pull/2497#discussion_r1225947886


##########
helix-core/src/main/java/org/apache/helix/HelixCloudProperty.java:
##########
@@ -141,10 +160,19 @@ public List<String> getCloudInfoSources() {
     return _cloudInfoSources;
   }
 
+  @Deprecated

Review Comment:
   Let' not deprecate it. Since we decide move forward with pkg name + processor name. Then it would be valuable to let user get process name and pkg name separately.



##########
helix-core/src/main/java/org/apache/helix/HelixCloudProperty.java:
##########
@@ -58,8 +59,13 @@ public class HelixCloudProperty {
   private List<String> _cloudInfoSources;
 
   // The name of the function that will fetch and parse cloud instance information.
+  @Deprecated

Review Comment:
   For backward compatible, may be we can let 
   
   _cloudInfoProcessorFullyQualifiedClassName = pkg name + _cloudInfoProcessorName.
   
   Up to you. The reason is that it should be reflected to some functions as validator which does not exists today. Maybe we need a todo here.



##########
helix-core/src/main/java/org/apache/helix/HelixCloudProperty.java:
##########
@@ -117,6 +127,15 @@ public void populateFieldsWithCloudConfig(CloudConfig cloudConfig) {
         case CUSTOMIZED:
           setCloudInfoSources(cloudConfig.getCloudInfoSources());
           setCloudInfoProcessorName(cloudConfig.getCloudInfoProcessorName());
+          // Although it is unlikely that cloudInfoProcessorPackageName is null, when using the CUSTOMIZED
+          // cloud provider, we will look for the processor class in helix cloud package to preserves the
+          // backwards compatibility.
+          setCloudInfoProcessorFullyQualifiedClassName(
+              cloudConfig.getCloudInfoProcessorPackageName() != null ?
+                  cloudConfig.getCloudInfoProcessorPackageName() + "."
+                      + cloudConfig.getCloudInfoProcessorName()

Review Comment:
   Have we checked whether cloudConfig.getCloudInfoProcessorName() is null or not?



##########
helix-core/src/main/java/org/apache/helix/HelixCloudProperty.java:
##########
@@ -185,10 +213,20 @@ public void setCloudInfoSources(List<String> sources) {
     _cloudInfoSources = sources;
   }
 
+  @Deprecated
   public void setCloudInfoProcessorName(String cloudInfoProcessorName) {
     _cloudInfoProcessorName = cloudInfoProcessorName;
   }
 
+  /**
+   * Set the fully qualified class name of the cloud info processor.
+   * @param cloudInfoProcessorFullyQualifiedClassName
+   */
+  public void setCloudInfoProcessorFullyQualifiedClassName(

Review Comment:
   Be careful with this API. Once you public, it may allow user set this dirtectly, if they have control on HelixCloudProperty. Since our public entries are only pkg and processor, let's not expose this set API but only get API.



##########
helix-core/src/main/java/org/apache/helix/HelixCloudProperty.java:
##########
@@ -109,6 +116,9 @@ public void populateFieldsWithCloudConfig(CloudConfig cloudConfig) {
           setCloudInfoSources(
               Collections.singletonList(azureProperties.getProperty(CLOUD_INFO_SOURCE)));
           setCloudInfoProcessorName(azureProperties.getProperty(CLOUD_INFO_PROCESSOR_NAME));
+          setCloudInfoProcessorFullyQualifiedClassName(

Review Comment:
   NIT: Format problem? Helix has our own style formatter.



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

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org

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] desaikomal commented on pull request #2497: Add support for pluggable external CloudInfoProcessor and CustomizedCloudProperties

Posted by "desaikomal (via GitHub)" <gi...@apache.org>.
desaikomal commented on PR #2497:
URL: https://github.com/apache/helix/pull/2497#issuecomment-1569197678

   @zpinto - can this be discarded ?


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

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org

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] junkaixue merged pull request #2497: Add support for pluggable external CloudInfoProcessor and CustomizedCloudProperties

Posted by "junkaixue (via GitHub)" <gi...@apache.org>.
junkaixue merged PR #2497:
URL: https://github.com/apache/helix/pull/2497


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

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org

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] zpinto commented on a diff in pull request #2497: Add support for pluggable external CloudInfoProcessor and CustomizedCloudProperties

Posted by "zpinto (via GitHub)" <gi...@apache.org>.
zpinto commented on code in PR #2497:
URL: https://github.com/apache/helix/pull/2497#discussion_r1227327281


##########
helix-core/src/main/java/org/apache/helix/HelixCloudProperty.java:
##########
@@ -117,6 +127,15 @@ public void populateFieldsWithCloudConfig(CloudConfig cloudConfig) {
         case CUSTOMIZED:
           setCloudInfoSources(cloudConfig.getCloudInfoSources());
           setCloudInfoProcessorName(cloudConfig.getCloudInfoProcessorName());
+          // Although it is unlikely that cloudInfoProcessorPackageName is null, when using the CUSTOMIZED
+          // cloud provider, we will look for the processor class in helix cloud package to preserves the
+          // backwards compatibility.
+          setCloudInfoProcessorFullyQualifiedClassName(
+              cloudConfig.getCloudInfoProcessorPackageName() != null ?
+                  cloudConfig.getCloudInfoProcessorPackageName() + "."
+                      + cloudConfig.getCloudInfoProcessorName()

Review Comment:
   This is checked in the CloudConfig here: https://github.com/apache/helix/blob/master/helix-core/src/main/java/org/apache/helix/model/CloudConfig.java#L251
   



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

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org

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] zpinto commented on a diff in pull request #2497: Add support for pluggable external CloudInfoProcessor and CustomizedCloudProperties

Posted by "zpinto (via GitHub)" <gi...@apache.org>.
zpinto commented on code in PR #2497:
URL: https://github.com/apache/helix/pull/2497#discussion_r1223732062


##########
helix-core/src/main/java/org/apache/helix/manager/zk/ParticipantManager.java:
##########
@@ -242,13 +242,17 @@ private CloudInstanceInformation getCloudInstanceInformation() {
         _helixManagerProperty.getHelixCloudProperty().getCloudInfoProcessorName();
     try {
       // fetch cloud instance information for the instance
-      String cloudInstanceInformationProcessorClassName = CLOUD_PROCESSOR_PATH_PREFIX
-          + _helixManagerProperty.getHelixCloudProperty().getCloudProvider().toLowerCase() + "."
-          + cloudInstanceInformationProcessorName;
+      String cloudInstanceInformationProcessorClassName =

Review Comment:
   Yes, you are correct. The logic to construct the fully qualified path does not really belong in `ParticipantManager`. I have moved this to `HelixCloudProperty` instead.  I have also added a new field called `CLOUD_INFO_PROCESSOR_PACKAGE_NAME` to `CloudConfig` to allow user to specify the package instead of using `CLOUD_INFO_PROCESSOR_NAME` for 2 different things.
   
   Based on the usage of `_cloudInfoProcessorName`, I also decided to deprecate that and create `_cloudInfoProcessorFullyQualifiedClassName`.
   
   Now `ParticipantManager` will just call `getCloudInfoProcessorFullyQualifiedClassName` and attempt to load the class.



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

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org

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] zpinto commented on a diff in pull request #2497: Add support for pluggable external CloudInfoProcessor and CustomizedCloudProperties

Posted by "zpinto (via GitHub)" <gi...@apache.org>.
zpinto commented on code in PR #2497:
URL: https://github.com/apache/helix/pull/2497#discussion_r1227328949


##########
helix-core/src/main/java/org/apache/helix/HelixCloudProperty.java:
##########
@@ -185,10 +213,20 @@ public void setCloudInfoSources(List<String> sources) {
     _cloudInfoSources = sources;
   }
 
+  @Deprecated
   public void setCloudInfoProcessorName(String cloudInfoProcessorName) {
     _cloudInfoProcessorName = cloudInfoProcessorName;
   }
 
+  /**
+   * Set the fully qualified class name of the cloud info processor.
+   * @param cloudInfoProcessorFullyQualifiedClassName
+   */
+  public void setCloudInfoProcessorFullyQualifiedClassName(

Review Comment:
   Made `setCloudInfoProcessorPackage` private.



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

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org

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] junkaixue commented on a diff in pull request #2497: Add support for pluggable external CloudInfoProcessor and CustomizedCloudProperties

Posted by "junkaixue (via GitHub)" <gi...@apache.org>.
junkaixue commented on code in PR #2497:
URL: https://github.com/apache/helix/pull/2497#discussion_r1220914035


##########
helix-core/src/test/java/org/apache/helix/integration/paticipant/CustomCloudInstanceInformationProcessor.java:
##########
@@ -0,0 +1,28 @@
+package org.apache.helix.integration.paticipant;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.helix.HelixCloudProperty;
+import org.apache.helix.api.cloud.CloudInstanceInformation;
+import org.apache.helix.api.cloud.CloudInstanceInformationProcessor;
+import org.apache.helix.cloud.azure.AzureCloudInstanceInformation;
+
+/**
+ * This is a custom implementation of CloudInstanceInformationProcessor.
+ * It is used to test the functionality of Helix node auto-registration.
+ */
+public class CustomCloudInstanceInformationProcessor implements CloudInstanceInformationProcessor<String> {
+  public CustomCloudInstanceInformationProcessor(HelixCloudProperty helixCloudProperty) {
+  }
+
+  @Override
+  public List<String> fetchCloudInstanceInformation() {
+    return Collections.singletonList("response");
+  }
+
+  @Override
+  public CloudInstanceInformation parseCloudInstanceInformation(List<String> responses) {
+    return new AzureCloudInstanceInformation.Builder().setFaultDomain("rack=A:123, host=").build();

Review Comment:
   If this is customized, why we use Azure's... This is a little confusing.



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

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org

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] zpinto commented on a diff in pull request #2497: Add support for pluggable external CloudInfoProcessor and CustomizedCloudProperties

Posted by "zpinto (via GitHub)" <gi...@apache.org>.
zpinto commented on code in PR #2497:
URL: https://github.com/apache/helix/pull/2497#discussion_r1223733055


##########
helix-core/src/test/java/org/apache/helix/integration/paticipant/CustomCloudInstanceInformationProcessor.java:
##########
@@ -0,0 +1,28 @@
+package org.apache.helix.integration.paticipant;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.helix.HelixCloudProperty;
+import org.apache.helix.api.cloud.CloudInstanceInformation;
+import org.apache.helix.api.cloud.CloudInstanceInformationProcessor;
+import org.apache.helix.cloud.azure.AzureCloudInstanceInformation;
+
+/**
+ * This is a custom implementation of CloudInstanceInformationProcessor.
+ * It is used to test the functionality of Helix node auto-registration.
+ */
+public class CustomCloudInstanceInformationProcessor implements CloudInstanceInformationProcessor<String> {
+  public CustomCloudInstanceInformationProcessor(HelixCloudProperty helixCloudProperty) {
+  }
+
+  @Override
+  public List<String> fetchCloudInstanceInformation() {
+    return Collections.singletonList("response");
+  }
+
+  @Override
+  public CloudInstanceInformation parseCloudInstanceInformation(List<String> responses) {
+    return new AzureCloudInstanceInformation.Builder().setFaultDomain("rack=A:123, host=").build();

Review Comment:
   I have replaced the use of `AzureCloudInstanceInformation` with `CustomCloudInstanceInformation`.



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

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org

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] zpinto commented on pull request #2497: Add support for pluggable external CloudInfoProcessor and CustomizedCloudProperties

Posted by "zpinto (via GitHub)" <gi...@apache.org>.
zpinto commented on PR #2497:
URL: https://github.com/apache/helix/pull/2497#issuecomment-1590153014

   This PR is ready to be merged
   
   Final Commit Message:
   Add support for CloudInstanceInfoProcessor and CloudInstanceInfo from an external package when using CUSTOMIZED cloud provider.
   


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

To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org

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