You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/08/10 20:17:19 UTC

[GitHub] [hudi] nsivabalan opened a new pull request #3450: [HUDI-2294] Adding virtual keys props in deltastreamer

nsivabalan opened a new pull request #3450:
URL: https://github.com/apache/hudi/pull/3450


   ## What is the purpose of the pull request
   
   Set table props pertaining to virtual keys when a table is created via deltastreamer. 
   
   ## Brief change log
   
   *(for example:)*
     - *Modify AnnotationLocation checkstyle rule in checkstyle.xml*
   
   ## Verify this pull request
   
   *(Please pick either of the following options)*
   
   This pull request is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This pull request is already covered by existing tests, such as *(please describe tests)*.
   
   (or)
   
   This change added tests and can be verified as follows:
   
   *(example:)*
   
     - *Added integration tests for end-to-end.*
     - *Added HoodieClientWriteTest to verify the change.*
     - *Manually verified the change by running a job locally.*
   
   ## Committer checklist
   
    - [ ] Has a corresponding JIRA in PR title & commit
    
    - [ ] Commit message is descriptive of the change
    
    - [ ] CI is green
   
    - [ ] Necessary doc changes done or have another open PR
          
    - [ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot edited a comment on pull request #3450: [HUDI-2294] Adding virtual keys props in deltastreamer

Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3450:
URL: https://github.com/apache/hudi/pull/3450#issuecomment-896291526


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9f5129d29d3c320ac0ad6b68a8dfaa5b9b81334a",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1630",
       "triggerID" : "9f5129d29d3c320ac0ad6b68a8dfaa5b9b81334a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9f5129d29d3c320ac0ad6b68a8dfaa5b9b81334a Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1630) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run travis` re-run the last Travis build
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] nsivabalan commented on a change in pull request #3450: [HUDI-2294] Adding virtual keys props in deltastreamer path

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on a change in pull request #3450:
URL: https://github.com/apache/hudi/pull/3450#discussion_r686494176



##########
File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/DeltaSync.java
##########
@@ -249,14 +251,20 @@ public void refreshTimeline() throws IOException {
     } else {
       this.commitTimelineOpt = Option.empty();
       String partitionColumns = HoodieWriterUtils.getPartitionColumns(keyGenerator);
-
+      LOG.warn("Partition cols " + partitionColumns);
       HoodieTableMetaClient.withPropertyBuilder()
           .setTableType(cfg.tableType)
           .setTableName(cfg.targetTableName)
           .setArchiveLogFolder(HOODIE_ARCHIVELOG_FOLDER_PROP.defaultValue())
           .setPayloadClassName(cfg.payloadClassName)
           .setBaseFileFormat(cfg.baseFileFormat)
           .setPartitionFields(partitionColumns)
+          .setPartitionFields(props.getProperty(DataSourceWriteOptions.PARTITIONPATH_FIELD().key()))

Review comment:
       One of them is used for spark-sql and is a concatenation of partition columns. partitionField is used for virtual keys and is same value as "hoodie.datasource.write.partitionpath.field"




-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot edited a comment on pull request #3450: [HUDI-2294] Adding virtual keys props in deltastreamer path

Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3450:
URL: https://github.com/apache/hudi/pull/3450#issuecomment-896291526


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9f5129d29d3c320ac0ad6b68a8dfaa5b9b81334a",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1630",
       "triggerID" : "9f5129d29d3c320ac0ad6b68a8dfaa5b9b81334a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0886f06dc863f5a641c730518aea79e420871676",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1665",
       "triggerID" : "0886f06dc863f5a641c730518aea79e420871676",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0886f06dc863f5a641c730518aea79e420871676 Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1665) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run travis` re-run the last Travis build
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot edited a comment on pull request #3450: [HUDI-2294] Adding virtual keys props in deltastreamer

Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3450:
URL: https://github.com/apache/hudi/pull/3450#issuecomment-896291526


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9f5129d29d3c320ac0ad6b68a8dfaa5b9b81334a",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1630",
       "triggerID" : "9f5129d29d3c320ac0ad6b68a8dfaa5b9b81334a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9f5129d29d3c320ac0ad6b68a8dfaa5b9b81334a Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1630) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run travis` re-run the last Travis build
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] nsivabalan commented on pull request #3450: [HUDI-2294] Adding virtual keys props in deltastreamer path

Posted by GitBox <gi...@apache.org>.
nsivabalan commented on pull request #3450:
URL: https://github.com/apache/hudi/pull/3450#issuecomment-897117315


   @codope : fixed the issue. PTAL


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] codope commented on a change in pull request #3450: [HUDI-2294] Adding virtual keys props in deltastreamer path

Posted by GitBox <gi...@apache.org>.
codope commented on a change in pull request #3450:
URL: https://github.com/apache/hudi/pull/3450#discussion_r686489245



##########
File path: hudi-utilities/src/main/java/org/apache/hudi/utilities/deltastreamer/DeltaSync.java
##########
@@ -249,14 +251,20 @@ public void refreshTimeline() throws IOException {
     } else {
       this.commitTimelineOpt = Option.empty();
       String partitionColumns = HoodieWriterUtils.getPartitionColumns(keyGenerator);
-
+      LOG.warn("Partition cols " + partitionColumns);
       HoodieTableMetaClient.withPropertyBuilder()
           .setTableType(cfg.tableType)
           .setTableName(cfg.targetTableName)
           .setArchiveLogFolder(HOODIE_ARCHIVELOG_FOLDER_PROP.defaultValue())
           .setPayloadClassName(cfg.payloadClassName)
           .setBaseFileFormat(cfg.baseFileFormat)
           .setPartitionFields(partitionColumns)
+          .setPartitionFields(props.getProperty(DataSourceWriteOptions.PARTITIONPATH_FIELD().key()))

Review comment:
       Partition field is being set twice. Is this necessary?  




-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot commented on pull request #3450: [HUDI-2294] Adding virtual keys props in deltastreamer

Posted by GitBox <gi...@apache.org>.
hudi-bot commented on pull request #3450:
URL: https://github.com/apache/hudi/pull/3450#issuecomment-896291526


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9f5129d29d3c320ac0ad6b68a8dfaa5b9b81334a",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "9f5129d29d3c320ac0ad6b68a8dfaa5b9b81334a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9f5129d29d3c320ac0ad6b68a8dfaa5b9b81334a UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run travis` re-run the last Travis build
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot edited a comment on pull request #3450: [HUDI-2294] Adding virtual keys props in deltastreamer path

Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3450:
URL: https://github.com/apache/hudi/pull/3450#issuecomment-896291526


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9f5129d29d3c320ac0ad6b68a8dfaa5b9b81334a",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1630",
       "triggerID" : "9f5129d29d3c320ac0ad6b68a8dfaa5b9b81334a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0886f06dc863f5a641c730518aea79e420871676",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "0886f06dc863f5a641c730518aea79e420871676",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9f5129d29d3c320ac0ad6b68a8dfaa5b9b81334a Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1630) 
   * 0886f06dc863f5a641c730518aea79e420871676 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run travis` re-run the last Travis build
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] nsivabalan merged pull request #3450: [HUDI-2294] Adding virtual keys props in deltastreamer path

Posted by GitBox <gi...@apache.org>.
nsivabalan merged pull request #3450:
URL: https://github.com/apache/hudi/pull/3450


   


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [hudi] hudi-bot edited a comment on pull request #3450: [HUDI-2294] Adding virtual keys props in deltastreamer path

Posted by GitBox <gi...@apache.org>.
hudi-bot edited a comment on pull request #3450:
URL: https://github.com/apache/hudi/pull/3450#issuecomment-896291526


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9f5129d29d3c320ac0ad6b68a8dfaa5b9b81334a",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1630",
       "triggerID" : "9f5129d29d3c320ac0ad6b68a8dfaa5b9b81334a",
       "triggerType" : "PUSH"
     }, {
       "hash" : "0886f06dc863f5a641c730518aea79e420871676",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1665",
       "triggerID" : "0886f06dc863f5a641c730518aea79e420871676",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9f5129d29d3c320ac0ad6b68a8dfaa5b9b81334a Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1630) 
   * 0886f06dc863f5a641c730518aea79e420871676 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=1665) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@hudi-bot run travis` re-run the last Travis build
    - `@hudi-bot run azure` re-run the last Azure build
   </details>


-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org