You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2020/03/10 18:29:16 UTC

[GitHub] [incubator-gobblin] ZihanLi58 opened a new pull request #2917: [Gobblin-1077] Fix bug in HiveDataset.resolveConfig

ZihanLi58 opened a new pull request #2917: [Gobblin-1077] Fix bug in HiveDataset.resolveConfig
URL: https://github.com/apache/incubator-gobblin/pull/2917
 
 
   Dear Gobblin maintainers,
   
   Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
   
   
   ### JIRA
   - [ ] My PR addresses the following [Gobblin JIRA](https://issues.apache.org/jira/browse/GOBBLIN/) issues and references them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"
       - https://issues.apache.org/jira/browse/GOBBLIN-1077
   
   
   ### Description
   - [ ] Here are some details about my PR, including screenshots (if applicable):
   In resolveConfig, we get a config object, and resolve the value and put all of them in a property object without desanitize the key. And when transform the property object back to config, there is a chance to get runTime exception. 
   
   Solution: directly construct a config object instead config->property->config
   
   ### Tests
   - [ ] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
   Unit test
   
   ### Commits
   - [ ] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. 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
       2. Subject is limited to 50 characters
       3. Subject does not end with a period
       4. Subject uses the imperative mood ("add", not "adding")
       5. Body wraps at 72 characters
       6. Body explains "what" and "why", not "how"
   
   

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


With regards,
Apache Git Services

[GitHub] [incubator-gobblin] ZihanLi58 commented on a change in pull request #2917: [Gobblin-1077] Fix bug in HiveDataset.resolveConfig

Posted by GitBox <gi...@apache.org>.
ZihanLi58 commented on a change in pull request #2917: [Gobblin-1077] Fix bug in HiveDataset.resolveConfig
URL: https://github.com/apache/incubator-gobblin/pull/2917#discussion_r390627886
 
 

 ##########
 File path: gobblin-data-management/src/test/java/org/apache/gobblin/data/management/copy/hive/HiveDatasetTest.java
 ##########
 @@ -162,5 +164,6 @@ public void testResolveConfig() throws IOException {
         "resPrefix_logicalDb_resPostfix", "Logical DB not resolved correctly");
     Assert.assertEquals(resolvedConfig.getString(HiveDatasetVersionCleaner.REPLACEMENT_HIVE_TABLE_NAME_KEY),
         "resPrefix_logicalTable_resPostfix", "Logical Table not resolved correctly");
+    Assert.assertEquals(resolvedConfig.getString(DUMMY_CONFIG_KEY_WITH_ROOT_VALUE),"testRoot");
 
 Review comment:
   Yes. if the config key ends with the .ROOT_VALUE, it will through RuntimeException in ConfigUtils.propertiesToConfig()

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


With regards,
Apache Git Services

[GitHub] [incubator-gobblin] autumnust commented on issue #2917: [Gobblin-1077] Fix bug in HiveDataset.resolveConfig

Posted by GitBox <gi...@apache.org>.
autumnust commented on issue #2917: [Gobblin-1077] Fix bug in HiveDataset.resolveConfig
URL: https://github.com/apache/incubator-gobblin/pull/2917#issuecomment-597330120
 
 
   > Dear Gobblin maintainers,
   > 
   > Please accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!
   > 
   > ### JIRA
   > * [ ]  My PR addresses the following [Gobblin JIRA](https://issues.apache.org/jira/browse/GOBBLIN/) issues and references them in the PR title. For example, "[GOBBLIN-XXX] My Gobblin PR"
   >   
   >   * https://issues.apache.org/jira/browse/GOBBLIN-1077
   > 
   > ### Description
   > * [ ]  Here are some details about my PR, including screenshots (if applicable):
   >   In resolveConfig, we get a config object, and resolve the value and put all of them in a property object without desanitize the key. And when transform the property object back to config, there is a chance to get runTime exception.
   > 
   > Solution: directly construct a config object instead config->property->config
   > 
   > ### Tests
   > * [ ]  My PR adds the following unit tests **OR** does not need testing for this extremely good reason:
   >   Unit test
   > 
   > ### Commits
   > * [ ]  My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. 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
   >   2. Subject is limited to 50 characters
   >   3. Subject does not end with a period
   >   4. Subject uses the imperative mood ("add", not "adding")
   >   5. Body wraps at 72 characters
   >   6. Body explains "what" and "why", not "how"
   
   I am not sure what does "desanitize the key" mean? 

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


With regards,
Apache Git Services

[GitHub] [incubator-gobblin] autumnust commented on a change in pull request #2917: [Gobblin-1077] Fix bug in HiveDataset.resolveConfig

Posted by GitBox <gi...@apache.org>.
autumnust commented on a change in pull request #2917: [Gobblin-1077] Fix bug in HiveDataset.resolveConfig
URL: https://github.com/apache/incubator-gobblin/pull/2917#discussion_r390631589
 
 

 ##########
 File path: gobblin-data-management/src/test/java/org/apache/gobblin/data/management/copy/hive/HiveDatasetTest.java
 ##########
 @@ -162,5 +164,6 @@ public void testResolveConfig() throws IOException {
         "resPrefix_logicalDb_resPostfix", "Logical DB not resolved correctly");
     Assert.assertEquals(resolvedConfig.getString(HiveDatasetVersionCleaner.REPLACEMENT_HIVE_TABLE_NAME_KEY),
         "resPrefix_logicalTable_resPostfix", "Logical Table not resolved correctly");
+    Assert.assertEquals(resolvedConfig.getString(DUMMY_CONFIG_KEY_WITH_ROOT_VALUE),"testRoot");
 
 Review comment:
   OK I got it.  Can you use ConfigUtils.STRIP_SUFFIX to replace raw string "ROOT_VALUE" here, where there's a clear explanation on why this suffix is added initially. 

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


With regards,
Apache Git Services

[GitHub] [incubator-gobblin] asfgit closed pull request #2917: [Gobblin-1077] Fix bug in HiveDataset.resolveConfig

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #2917: [Gobblin-1077] Fix bug in HiveDataset.resolveConfig
URL: https://github.com/apache/incubator-gobblin/pull/2917
 
 
   

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


With regards,
Apache Git Services

[GitHub] [incubator-gobblin] ZihanLi58 commented on issue #2917: [Gobblin-1077] Fix bug in HiveDataset.resolveConfig

Posted by GitBox <gi...@apache.org>.
ZihanLi58 commented on issue #2917: [Gobblin-1077] Fix bug in HiveDataset.resolveConfig
URL: https://github.com/apache/incubator-gobblin/pull/2917#issuecomment-597319626
 
 
   @autumnust Can you please take a look at this minor change? Thanks

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


With regards,
Apache Git Services

[GitHub] [incubator-gobblin] autumnust commented on a change in pull request #2917: [Gobblin-1077] Fix bug in HiveDataset.resolveConfig

Posted by GitBox <gi...@apache.org>.
autumnust commented on a change in pull request #2917: [Gobblin-1077] Fix bug in HiveDataset.resolveConfig
URL: https://github.com/apache/incubator-gobblin/pull/2917#discussion_r390626385
 
 

 ##########
 File path: gobblin-data-management/src/test/java/org/apache/gobblin/data/management/copy/hive/HiveDatasetTest.java
 ##########
 @@ -162,5 +164,6 @@ public void testResolveConfig() throws IOException {
         "resPrefix_logicalDb_resPostfix", "Logical DB not resolved correctly");
     Assert.assertEquals(resolvedConfig.getString(HiveDatasetVersionCleaner.REPLACEMENT_HIVE_TABLE_NAME_KEY),
         "resPrefix_logicalTable_resPostfix", "Logical Table not resolved correctly");
+    Assert.assertEquals(resolvedConfig.getString(DUMMY_CONFIG_KEY_WITH_ROOT_VALUE),"testRoot");
 
 Review comment:
   Is this the case that will be failed without this change? 

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


With regards,
Apache Git Services

[GitHub] [incubator-gobblin] ZihanLi58 commented on a change in pull request #2917: [Gobblin-1077] Fix bug in HiveDataset.resolveConfig

Posted by GitBox <gi...@apache.org>.
ZihanLi58 commented on a change in pull request #2917: [Gobblin-1077] Fix bug in HiveDataset.resolveConfig
URL: https://github.com/apache/incubator-gobblin/pull/2917#discussion_r390627886
 
 

 ##########
 File path: gobblin-data-management/src/test/java/org/apache/gobblin/data/management/copy/hive/HiveDatasetTest.java
 ##########
 @@ -162,5 +164,6 @@ public void testResolveConfig() throws IOException {
         "resPrefix_logicalDb_resPostfix", "Logical DB not resolved correctly");
     Assert.assertEquals(resolvedConfig.getString(HiveDatasetVersionCleaner.REPLACEMENT_HIVE_TABLE_NAME_KEY),
         "resPrefix_logicalTable_resPostfix", "Logical Table not resolved correctly");
+    Assert.assertEquals(resolvedConfig.getString(DUMMY_CONFIG_KEY_WITH_ROOT_VALUE),"testRoot");
 
 Review comment:
   Yes. if the config key ends with the .ROOT_VALUE, it will throw RuntimeException in ConfigUtils.propertiesToConfig()

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


With regards,
Apache Git Services