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 2022/02/09 09:27:14 UTC

[GitHub] [hudi] todd5167 opened a new pull request #4774: fix NPE caused by incorrect beforeKeyGenClassName validation

todd5167 opened a new pull request #4774:
URL: https://github.com/apache/hudi/pull/4774


   ## *Tips*
   - *Thank you very much for contributing to Apache Hudi.*
   - *Please review https://hudi.apache.org/contribute/how-to-contribute before opening a pull request.*
   
   ## What is the purpose of the pull request
   
   * Incorrect verification of KeyGenClass attribute results in NPE.  If not set, return an empty string, NPE appears when getRecordKey *
   
   ## Brief change log
   
   *(for example:)*
     - *Modify org.apache.spark.sql.hudi.command.SqlKeyGenerator#originKeyGen *
   
   ## 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 commented on pull request #4774: [HUDI-3401] fix NPE caused by incorrect beforeKeyGenClassName validation

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0b5313d59681f2fedca254fe2677f15efee9f47a",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5835",
       "triggerID" : "0b5313d59681f2fedca254fe2677f15efee9f47a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0b5313d59681f2fedca254fe2677f15efee9f47a Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5835) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@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] todd5167 commented on pull request #4774: [HUDI-3401] fix NPE caused by incorrect beforeKeyGenClassName validation

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


   > @todd5167 LGTM. But if you show some codes or steps to indicate how to reproduce this , it will be nice.
   
   @YannByron   Execute insert statement using spark sql,with the default KEYGEN_CLASS, the exception occurs when the RecordKey is generated. 
   
   e.g.:INSERT into `hudi_mor_rt`  partition(order_date = '20220209')  values (5,'todd',1,1,'x','x')
   
   


-- 
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] YannByron commented on pull request #4774: [HUDI-3401] fix NPE caused by incorrect beforeKeyGenClassName validation

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


   @todd5167 I create a mor table, and insert some data, but i can reproduce this issues. can you give the complete sqls please?
   
   the codes that i test like this:
   ```
   create table hudi_mor_tbl (uuid long, name string, order_date string) using hudi partitioned by (order_date) tblproperties (type='mor');
   insert into hudi_mor_tbl values (5,'todd', '20220209');
   insert into hudi_mor_tbl partition(order_date = '20220210') values (6,'todd');
   insert into hudi_mor_tbl_rt partition(order_date = '20220210') values (7,'todd'); -- this use the rt table.
   ```


-- 
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 removed a comment on pull request #4774: [HUDI-3401] fix NPE caused by incorrect beforeKeyGenClassName validation

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0b5313d59681f2fedca254fe2677f15efee9f47a",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5835",
       "triggerID" : "0b5313d59681f2fedca254fe2677f15efee9f47a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0b5313d59681f2fedca254fe2677f15efee9f47a Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5835) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@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 #4774: [HUDI-3401] fix NPE caused by incorrect beforeKeyGenClassName validation

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


   thanks Yann. 


-- 
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 #4774: fix NPE caused by incorrect beforeKeyGenClassName validation

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0b5313d59681f2fedca254fe2677f15efee9f47a",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "0b5313d59681f2fedca254fe2677f15efee9f47a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0b5313d59681f2fedca254fe2677f15efee9f47a UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@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] YannByron commented on pull request #4774: [HUDI-3401] fix NPE caused by incorrect beforeKeyGenClassName validation

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


   @todd5167 can you show some codes or steps so that so we can re-produce this ?


-- 
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 #4774: [HUDI-3401] fix NPE caused by incorrect beforeKeyGenClassName validation

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


   @YannByron : Can you review please. 


-- 
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 removed a comment on pull request #4774: fix NPE caused by incorrect beforeKeyGenClassName validation

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0b5313d59681f2fedca254fe2677f15efee9f47a",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "0b5313d59681f2fedca254fe2677f15efee9f47a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0b5313d59681f2fedca254fe2677f15efee9f47a UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@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] YannByron commented on pull request #4774: [HUDI-3401] fix NPE caused by incorrect beforeKeyGenClassName validation

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


   @todd5167 I create a mor table, and insert some data, but i can reproduce this issues. can you give the complete sqls please?
   
   the codes that i test like this:
   ```
   create table hudi_mor_tbl (uuid long, name string, order_date string) using hudi partitioned by (order_date) tblproperties (type='mor');
   insert into hudi_mor_tbl values (5,'todd', '20220209');
   insert into hudi_mor_tbl partition(order_date = '20220210') values (6,'todd');
   insert into hudi_mor_tbl_rt partition(order_date = '20220210') values (7,'todd'); -- this use the rt table.
   ```


-- 
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] YannByron commented on pull request #4774: [HUDI-3401] fix NPE caused by incorrect beforeKeyGenClassName validation

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


   @nsivabalan if you have no other updates, please merge it.


-- 
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] YannByron edited a comment on pull request #4774: [HUDI-3401] fix NPE caused by incorrect beforeKeyGenClassName validation

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


   @todd5167 LGTM. But if you show some codes or steps to indicate how to reproduce this , it will be nice.


-- 
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] todd5167 commented on pull request #4774: [HUDI-3401] fix NPE caused by incorrect beforeKeyGenClassName validation

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


   > @todd5167 I create a mor table, and insert some data, but i can reproduce this issues. can you give the complete sqls please?
   > 
   > the codes that i test like this:
   > 
   > ```
   > create table hudi_mor_tbl (uuid long, name string, order_date string) using hudi partitioned by (order_date) tblproperties (type='mor');
   > insert into hudi_mor_tbl values (5,'todd', '20220209');
   > insert into hudi_mor_tbl partition(order_date = '20220210') values (6,'todd');
   > insert into hudi_mor_tbl_rt partition(order_date = '20220210') values (7,'todd'); -- this use the rt table.
   > ```
   
   
   
   @YannByron 
   val beforeKeyGenClassName = props.getString(SqlKeyGenerator.ORIGIN_KEYGEN_CLASS_NAME, null)
   
   You only need to verify whether the current return value is an empty string or Null.
   


-- 
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] YannByron commented on pull request #4774: [HUDI-3401] fix NPE caused by incorrect beforeKeyGenClassName validation

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


   @todd5167 I know this pr can work and have no side effect. Sorry for my insistence. i'm just a little pertinacious to find a reproducible steps that cause NPE here.


-- 
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 #4774: [HUDI-3401] fix NPE caused by incorrect beforeKeyGenClassName validation

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


   


-- 
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 #4774: fix NPE caused by incorrect beforeKeyGenClassName validation

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


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "0b5313d59681f2fedca254fe2677f15efee9f47a",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5835",
       "triggerID" : "0b5313d59681f2fedca254fe2677f15efee9f47a",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0b5313d59681f2fedca254fe2677f15efee9f47a Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=5835) 
   
   <details>
   <summary>Bot commands</summary>
     @hudi-bot supports the following commands:
   
    - `@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