You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2020/07/09 00:44:29 UTC

[GitHub] [incubator-pinot] kishoreg opened a new pull request #5669: Fixing code to fetch the fsConfig from the right parent

kishoreg opened a new pull request #5669:
URL: https://github.com/apache/incubator-pinot/pull/5669


   ## Description
   
   We were initializing the pinot fs class with incorrect configuration.
   
   Before: 
   
   > Got scheme s3, initializing class org.apache.pinot.plugin.filesystem.LocalFS with config : {=org.apache.pinot.plugin.filesystem.LocalFS} 
   
   After
   
   > Got scheme s3, initializing class org.apache.pinot.plugin.filesystem.LocalFS with config : {secretkey=secret, accesskey=access, region=myregion} 
   
   Added test case
   ## Upgrade Notes
   Does this PR prevent a zero down-time upgrade? (Assume upgrade order: Controller, Broker, Server, Minion)
   * [ ] Yes (Please label as **<code>backward-incompat</code>**, and complete the section below on Release Notes)
   
   Does this PR fix a zero-downtime upgrade introduced earlier?
   * [ ] Yes (Please label this as **<code>backward-incompat</code>**, and complete the section below on Release Notes)
   
   Does this PR otherwise need attention when creating release notes? Things to consider:
   - New configuration options
   - Deprecation of configurations
   - Signature changes to public methods/interfaces
   - New plugins added or old plugins removed
   * [ ] Yes (Please label this PR as **<code>release-notes</code>** and complete the section on Release Notes)
   ## Release Notes
   If you have tagged this as either backward-incompat or release-notes,
   you MUST add text here that you would like to see appear in release notes of the
   next release.
   
   If you have a series of commits adding or enabling a feature, then
   add this section only in final commit that marks the feature completed.
   Refer to earlier release notes to see examples of text
   
   ## Documentation
   If you have introduced a new feature or configuration, please add it to the documentation as well.
   See https://docs.pinot.apache.org/developers/developers-and-contributors/update-document
   


----------------------------------------------------------------
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: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] kishoreg commented on a change in pull request #5669: Fixing code to fetch the fsConfig from the right parent

Posted by GitBox <gi...@apache.org>.
kishoreg commented on a change in pull request #5669:
URL: https://github.com/apache/incubator-pinot/pull/5669#discussion_r451954273



##########
File path: pinot-spi/src/main/java/org/apache/pinot/spi/filesystem/PinotFSFactory.java
##########
@@ -60,19 +60,19 @@ public static void register(String scheme, String fsClassName, PinotConfiguratio
     }
   }
 
-  public static void init(PinotConfiguration fsConfig) {
+  public static void init(PinotConfiguration config) {

Review comment:
        its called with fsFactoryConfig, renamed the 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: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] Jackie-Jiang commented on a change in pull request #5669: Fixing code to fetch the fsConfig from the right parent

Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on a change in pull request #5669:
URL: https://github.com/apache/incubator-pinot/pull/5669#discussion_r451902803



##########
File path: pinot-spi/src/main/java/org/apache/pinot/spi/filesystem/PinotFSFactory.java
##########
@@ -60,19 +60,19 @@ public static void register(String scheme, String fsClassName, PinotConfiguratio
     }
   }
 
-  public static void init(PinotConfiguration fsConfig) {
+  public static void init(PinotConfiguration config) {
     // Get schemes and their respective classes
-    PinotConfiguration schemesConfiguration = fsConfig.subset(CLASS);
+    PinotConfiguration schemesConfiguration = config.subset(CLASS);
     List<String> schemes = schemesConfiguration.getKeys();
     if (!schemes.isEmpty()) {
       LOGGER.info("Did not find any fs classes in the configuration");
     }
     
     for(String scheme : schemes){
-      String fsClassName = (String) schemesConfiguration.getProperty(scheme);
-      
-      LOGGER.info("Got scheme {}, classname {}, starting to initialize", scheme, fsClassName);
-      register(scheme, fsClassName, schemesConfiguration.subset(scheme));
+      String fsClassName = schemesConfiguration.getProperty(scheme);
+      PinotConfiguration fsConfiguration = config.subset(scheme);
+      LOGGER.info("Got scheme {}, initializing class {} with config : {} ", scheme, fsClassName, fsConfiguration.toMap());

Review comment:
       Let's not log the configs probably as they might contain sensitive content (e.g. password)




----------------------------------------------------------------
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: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] daniellavoie commented on pull request #5669: Fixing code to fetch the fsConfig from the right parent

Posted by GitBox <gi...@apache.org>.
daniellavoie commented on pull request #5669:
URL: https://github.com/apache/incubator-pinot/pull/5669#issuecomment-656185949


   https://github.com/apache/incubator-pinot/pull/5674 can actually be merged on this PR branch.


----------------------------------------------------------------
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: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] mayankshriv commented on a change in pull request #5669: Fixing code to fetch the fsConfig from the right parent

Posted by GitBox <gi...@apache.org>.
mayankshriv commented on a change in pull request #5669:
URL: https://github.com/apache/incubator-pinot/pull/5669#discussion_r451902715



##########
File path: pinot-spi/src/main/java/org/apache/pinot/spi/filesystem/PinotFSFactory.java
##########
@@ -60,19 +60,19 @@ public static void register(String scheme, String fsClassName, PinotConfiguratio
     }
   }
 
-  public static void init(PinotConfiguration fsConfig) {
+  public static void init(PinotConfiguration config) {

Review comment:
       I see all non-test callers of this api are calling it with fsConfig. Is that expected? Would be good to add javadoc based on what we find.




----------------------------------------------------------------
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: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] kishoreg commented on a change in pull request #5669: Fixing code to fetch the fsConfig from the right parent

Posted by GitBox <gi...@apache.org>.
kishoreg commented on a change in pull request #5669:
URL: https://github.com/apache/incubator-pinot/pull/5669#discussion_r451954329



##########
File path: pinot-spi/src/main/java/org/apache/pinot/spi/filesystem/PinotFSFactory.java
##########
@@ -60,19 +60,19 @@ public static void register(String scheme, String fsClassName, PinotConfiguratio
     }
   }
 
-  public static void init(PinotConfiguration fsConfig) {
+  public static void init(PinotConfiguration config) {
     // Get schemes and their respective classes
-    PinotConfiguration schemesConfiguration = fsConfig.subset(CLASS);
+    PinotConfiguration schemesConfiguration = config.subset(CLASS);
     List<String> schemes = schemesConfiguration.getKeys();
     if (!schemes.isEmpty()) {
       LOGGER.info("Did not find any fs classes in the configuration");
     }
     
     for(String scheme : schemes){
-      String fsClassName = (String) schemesConfiguration.getProperty(scheme);
-      
-      LOGGER.info("Got scheme {}, classname {}, starting to initialize", scheme, fsClassName);
-      register(scheme, fsClassName, schemesConfiguration.subset(scheme));
+      String fsClassName = schemesConfiguration.getProperty(scheme);
+      PinotConfiguration fsConfiguration = config.subset(scheme);
+      LOGGER.info("Got scheme {}, initializing class {} with config : {} ", scheme, fsClassName, fsConfiguration.toMap());

Review comment:
       fixed




----------------------------------------------------------------
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: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] daniellavoie commented on pull request #5669: Fixing code to fetch the fsConfig from the right parent

Posted by GitBox <gi...@apache.org>.
daniellavoie commented on pull request #5669:
URL: https://github.com/apache/incubator-pinot/pull/5669#issuecomment-656182611


   @kishoreg I've added full test coverage on PinotConfiguration. The base constructor that accepts Commons Configuration was broken and has been fixed. I also identified a missing register operation on the Hadoop JobRunner. If possible, can you rebase this PR branch to https://github.com/daniellavoie/incubator-pinot/tree/pinot-fs-bug-fix ? I can't push my modifications to branches in this repository. Thank you.


----------------------------------------------------------------
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: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[GitHub] [incubator-pinot] kishoreg merged pull request #5669: Fixing code to fetch the fsConfig from the right parent

Posted by GitBox <gi...@apache.org>.
kishoreg merged pull request #5669:
URL: https://github.com/apache/incubator-pinot/pull/5669


   


----------------------------------------------------------------
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: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org