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/11/28 03:31:32 UTC

[GitHub] [hudi] slfan1989 opened a new pull request, #7308: [HUDI-5283] Replace deprecated method Schema.parse With Schema.Parser.

slfan1989 opened a new pull request, #7308:
URL: https://github.com/apache/hudi/pull/7308

   ### Change Logs
   JIRA: HUDI-5283. Replace deprecated method Schema.parse With Schema.Parser.
   
   When reading the code, I found that `HoodieBootstrapSchemaProvider#getBootstrapSchema` uses the deprecated method `Schema.parse`, which can be replaced by `Schema.Parser().parse()`,
   At the same time, I searched at the moudle level, only to find that this place uses an deprecated method.
   
   ### Impact
   
   none.
   
   ### Risk level (write none, low medium or high below)
   
   none.
   
   ### Documentation Update
   
   none.
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Change Logs and Impact were stated clearly
   - [ ] Adequate tests were added if applicable
   - [ ] CI passed
   


-- 
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] danny0405 commented on a diff in pull request #7308: [HUDI-5283] Replace deprecated method Schema.parse With Schema.Parser.

Posted by GitBox <gi...@apache.org>.
danny0405 commented on code in PR #7308:
URL: https://github.com/apache/hudi/pull/7308#discussion_r1033189867


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/bootstrap/HoodieBootstrapSchemaProvider.java:
##########
@@ -48,7 +48,7 @@ public HoodieBootstrapSchemaProvider(HoodieWriteConfig writeConfig) {
   public final Schema getBootstrapSchema(HoodieEngineContext context, List<Pair<String, List<HoodieFileStatus>>> partitions) {
     if (writeConfig.getSchema() != null) {
       // Use schema specified by user if set
-      Schema userSchema = Schema.parse(writeConfig.getSchema());
+      Schema userSchema = new Schema.Parser().parse(writeConfig.getSchema());

Review Comment:
   Oops, didn't see it, @slfan1989 , can you fire another minor PR to track 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] slfan1989 commented on a diff in pull request #7308: [HUDI-5283] Replace deprecated method Schema.parse With Schema.Parser.

Posted by GitBox <gi...@apache.org>.
slfan1989 commented on code in PR #7308:
URL: https://github.com/apache/hudi/pull/7308#discussion_r1034207805


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/bootstrap/HoodieBootstrapSchemaProvider.java:
##########
@@ -48,7 +48,7 @@ public HoodieBootstrapSchemaProvider(HoodieWriteConfig writeConfig) {
   public final Schema getBootstrapSchema(HoodieEngineContext context, List<Pair<String, List<HoodieFileStatus>>> partitions) {
     if (writeConfig.getSchema() != null) {
       // Use schema specified by user if set
-      Schema userSchema = Schema.parse(writeConfig.getSchema());
+      Schema userSchema = new Schema.Parser().parse(writeConfig.getSchema());

Review Comment:
   @codope I will modify it to the mock method.



-- 
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 #7308: [HUDI-5283] Replace deprecated method Schema.parse With Schema.Parser.

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "b47298043316c2de21d02190049294686281e3ad",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "b47298043316c2de21d02190049294686281e3ad",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * b47298043316c2de21d02190049294686281e3ad 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] codope commented on a diff in pull request #7308: [HUDI-5283] Replace deprecated method Schema.parse With Schema.Parser.

Posted by GitBox <gi...@apache.org>.
codope commented on code in PR #7308:
URL: https://github.com/apache/hudi/pull/7308#discussion_r1033188718


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/bootstrap/HoodieBootstrapSchemaProvider.java:
##########
@@ -48,7 +48,7 @@ public HoodieBootstrapSchemaProvider(HoodieWriteConfig writeConfig) {
   public final Schema getBootstrapSchema(HoodieEngineContext context, List<Pair<String, List<HoodieFileStatus>>> partitions) {
     if (writeConfig.getSchema() != null) {
       // Use schema specified by user if set
-      Schema userSchema = Schema.parse(writeConfig.getSchema());
+      Schema userSchema = new Schema.Parser().parse(writeConfig.getSchema());

Review Comment:
   I see one more usage in `AvroFileDeltaInputWriter` in hudi-integ-test. Though it's not critical but would be good to fix there as well.



-- 
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 #7308: [HUDI-5283] Replace deprecated method Schema.parse With Schema.Parser.

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "b47298043316c2de21d02190049294686281e3ad",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=13266",
       "triggerID" : "b47298043316c2de21d02190049294686281e3ad",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * b47298043316c2de21d02190049294686281e3ad Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=13266) 
   
   <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] danny0405 commented on pull request #7308: [HUDI-5283] Replace deprecated method Schema.parse With Schema.Parser.

Posted by GitBox <gi...@apache.org>.
danny0405 commented on PR #7308:
URL: https://github.com/apache/hudi/pull/7308#issuecomment-1328636512

   The failed test case: `ITTestHoodieDataSource#testBatchUpsertWithMiniBatches` should not be affected by this patch, would merge it soon ~


-- 
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] slfan1989 commented on a diff in pull request #7308: [HUDI-5283] Replace deprecated method Schema.parse With Schema.Parser.

Posted by GitBox <gi...@apache.org>.
slfan1989 commented on code in PR #7308:
URL: https://github.com/apache/hudi/pull/7308#discussion_r1033548605


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/bootstrap/HoodieBootstrapSchemaProvider.java:
##########
@@ -48,7 +48,7 @@ public HoodieBootstrapSchemaProvider(HoodieWriteConfig writeConfig) {
   public final Schema getBootstrapSchema(HoodieEngineContext context, List<Pair<String, List<HoodieFileStatus>>> partitions) {
     if (writeConfig.getSchema() != null) {
       // Use schema specified by user if set
-      Schema userSchema = Schema.parse(writeConfig.getSchema());
+      Schema userSchema = new Schema.Parser().parse(writeConfig.getSchema());

Review Comment:
   Thanks for helping to review the code @codope @danny0405 , I will continue to follow up.



-- 
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 #7308: [HUDI-5283] Replace deprecated method Schema.parse With Schema.Parser.

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "b47298043316c2de21d02190049294686281e3ad",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=13266",
       "triggerID" : "b47298043316c2de21d02190049294686281e3ad",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * b47298043316c2de21d02190049294686281e3ad Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=13266) 
   
   <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] slfan1989 commented on pull request #7308: [HUDI-5283] Replace deprecated method Schema.parse With Schema.Parser.

Posted by GitBox <gi...@apache.org>.
slfan1989 commented on PR #7308:
URL: https://github.com/apache/hudi/pull/7308#issuecomment-1328490964

   @yihua Can you help review this pr? Thank you very much! Can you allow me to assign jira?
   ![image](https://user-images.githubusercontent.com/55643692/204188164-5641bf3d-314a-4e42-b92f-d83637780924.png)
   


-- 
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] danny0405 merged pull request #7308: [HUDI-5283] Replace deprecated method Schema.parse With Schema.Parser.

Posted by GitBox <gi...@apache.org>.
danny0405 merged PR #7308:
URL: https://github.com/apache/hudi/pull/7308


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