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/04/22 06:34:16 UTC

[GitHub] [hudi] xiarixiaoyao opened a new pull request, #5393: [MINOR] follow up HUDI-3921, address all comments

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

   ## *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
   
   *(For example: This pull request adds quick-start document.)*
   
   ## 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


Re: [PR] [HUDI-3921] Improve rewriteRecordWithNewSchema and refactor code [hudi]

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 closed pull request #5393: [HUDI-3921] Improve rewriteRecordWithNewSchema and refactor code
URL: https://github.com/apache/hudi/pull/5393


-- 
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] xushiyan commented on pull request #5393: [HUDI-3921] Improve rewriteRecordWithNewSchema and refactor code

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

   @xiarixiaoyao can you please rebase and verify this patch via some testing? sorry about the delay. let's try to land this 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] danny0405 commented on a diff in pull request #5393: [HUDI-3921] Improve rewriteRecordWithNewSchema and refactor code

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


##########
hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroUtils.java:
##########
@@ -826,7 +826,7 @@ private static Object rewriteRecordWithNewSchema(Object oldRecord, Schema oldSch
         }
         Map<Object, Object> map = (Map<Object, Object>) oldRecord;
         Map<Object, Object> newMap = new HashMap<>();
-        fieldNames.push("value");
+        fieldNames.push(MAP_TYPE_VALUE_NAME);

Review Comment:
   If the variable only used by this method, there is no need to make static variables, the JVM would cache the string constants.



-- 
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] alexeykudinkin commented on a diff in pull request #5393: [MINOR] follow up HUDI-3921, address all comments

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


##########
hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroUtils.java:
##########
@@ -840,13 +840,9 @@ private static Object rewriteRecordWithNewSchema(Object oldRecord, Schema oldSch
   }
 
   private static String createFullName(Deque<String> fieldNames) {
-    String result = "";
-    if (!fieldNames.isEmpty()) {
-      List<String> parentNames = new ArrayList<>();
-      fieldNames.descendingIterator().forEachRemaining(parentNames::add);
-      result = parentNames.stream().collect(Collectors.joining("."));
-    }
-    return result;
+    return StreamSupport

Review Comment:
   No need for Stream you can just do `String.join`



-- 
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 #5393: [MINOR] follow up HUDI-3921, address all comments

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82b433d183f1c034d69768b27c616fc862577907",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8227",
       "triggerID" : "82b433d183f1c034d69768b27c616fc862577907",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82b433d183f1c034d69768b27c616fc862577907 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8227) 
   
   <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] hudi-bot commented on pull request #5393: [MINOR] follow up HUDI-3921, address all comments

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82b433d183f1c034d69768b27c616fc862577907",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "82b433d183f1c034d69768b27c616fc862577907",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82b433d183f1c034d69768b27c616fc862577907 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


Re: [PR] [HUDI-3921] Improve rewriteRecordWithNewSchema and refactor code [hudi]

Posted by "yihua (via GitHub)" <gi...@apache.org>.
yihua commented on PR #5393:
URL: https://github.com/apache/hudi/pull/5393#issuecomment-1982655914

   @jonvex could you check if this PR is still needed?


-- 
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] xiarixiaoyao commented on pull request #5393: [MINOR] follow up HUDI-3921, address all comments

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

   @nsivabalan @alexeykudinkin  could you pls help me review this pr, 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.

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 #5393: [MINOR] follow up HUDI-3921, address all comments

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82b433d183f1c034d69768b27c616fc862577907",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8227",
       "triggerID" : "82b433d183f1c034d69768b27c616fc862577907",
       "triggerType" : "PUSH"
     }, {
       "hash" : "453114d3378bce0d6913d6f34d5383cdaa6e57bd",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8229",
       "triggerID" : "453114d3378bce0d6913d6f34d5383cdaa6e57bd",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 453114d3378bce0d6913d6f34d5383cdaa6e57bd Azure: [SUCCESS](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8229) 
   
   <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


Re: [PR] [HUDI-3921] Improve rewriteRecordWithNewSchema and refactor code [hudi]

Posted by "jonvex (via GitHub)" <gi...@apache.org>.
jonvex commented on PR #5393:
URL: https://github.com/apache/hudi/pull/5393#issuecomment-1984112820

   A lot of the changes in this pr are already in master. I think it's probably ok to close 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] hudi-bot commented on pull request #5393: [MINOR] follow up HUDI-3921, address all comments

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82b433d183f1c034d69768b27c616fc862577907",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8227",
       "triggerID" : "82b433d183f1c034d69768b27c616fc862577907",
       "triggerType" : "PUSH"
     }, {
       "hash" : "453114d3378bce0d6913d6f34d5383cdaa6e57bd",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "453114d3378bce0d6913d6f34d5383cdaa6e57bd",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82b433d183f1c034d69768b27c616fc862577907 Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8227) 
   * 453114d3378bce0d6913d6f34d5383cdaa6e57bd 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] hudi-bot commented on pull request #5393: [MINOR] follow up HUDI-3921, address all comments

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82b433d183f1c034d69768b27c616fc862577907",
       "status" : "CANCELED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8227",
       "triggerID" : "82b433d183f1c034d69768b27c616fc862577907",
       "triggerType" : "PUSH"
     }, {
       "hash" : "453114d3378bce0d6913d6f34d5383cdaa6e57bd",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8229",
       "triggerID" : "453114d3378bce0d6913d6f34d5383cdaa6e57bd",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82b433d183f1c034d69768b27c616fc862577907 Azure: [CANCELED](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8227) 
   * 453114d3378bce0d6913d6f34d5383cdaa6e57bd Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8229) 
   
   <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] hudi-bot commented on pull request #5393: [MINOR] follow up HUDI-3921, address all comments

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "82b433d183f1c034d69768b27c616fc862577907",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8227",
       "triggerID" : "82b433d183f1c034d69768b27c616fc862577907",
       "triggerType" : "PUSH"
     }, {
       "hash" : "453114d3378bce0d6913d6f34d5383cdaa6e57bd",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "453114d3378bce0d6913d6f34d5383cdaa6e57bd",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 82b433d183f1c034d69768b27c616fc862577907 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=8227) 
   * 453114d3378bce0d6913d6f34d5383cdaa6e57bd 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