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/07/21 01:39:07 UTC

[GitHub] [hudi] XuQianJin-Stars opened a new pull request, #6157: [HUDI-4431] Fix log file will not roll over to a new file

XuQianJin-Stars opened a new pull request, #6157:
URL: https://github.com/apache/hudi/pull/6157

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


[GitHub] [hudi] hudi-bot commented on pull request #6157: [HUDI-4431] Fix log file will not roll over to a new file

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f08b55659bc994e7aa6ac8793009427ca1f1e82d",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10119",
       "triggerID" : "f08b55659bc994e7aa6ac8793009427ca1f1e82d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f08b55659bc994e7aa6ac8793009427ca1f1e82d Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10119) 
   
   <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] xiarixiaoyao commented on a diff in pull request #6157: [HUDI-4431] Fix log file will not roll over to a new file

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


##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieLogFormatWriter.java:
##########
@@ -94,7 +94,8 @@ private FSDataOutputStream getOutputStream() throws IOException, InterruptedExce
       Path path = logFile.getPath();
       if (fs.exists(path)) {
         boolean isAppendSupported = StorageSchemes.isAppendSupported(fs.getScheme());
-        if (isAppendSupported) {
+        boolean needRollOverToNewFile = fs.getFileStatus(path).getLen() > sizeThreshold;
+        if (isAppendSupported && !needRollOverToNewFile) {

Review Comment:
   hi danny, flushToDiskIfRequired cannot work very well in some situation。
   in our product env, the log size will roll up to 30g+



-- 
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 #6157: [HUDI-4431] Fix log file will not roll over to a new file

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f08b55659bc994e7aa6ac8793009427ca1f1e82d",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "f08b55659bc994e7aa6ac8793009427ca1f1e82d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f08b55659bc994e7aa6ac8793009427ca1f1e82d 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] yihua commented on a diff in pull request #6157: [HUDI-4431] Fix log file will not roll over to a new file

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


##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieLogFormatWriter.java:
##########
@@ -94,7 +94,8 @@ private FSDataOutputStream getOutputStream() throws IOException, InterruptedExce
       Path path = logFile.getPath();
       if (fs.exists(path)) {
         boolean isAppendSupported = StorageSchemes.isAppendSupported(fs.getScheme());
-        if (isAppendSupported) {
+        boolean needRollOverToNewFile = fs.getFileStatus(path).getLen() > sizeThreshold;
+        if (isAppendSupported && !needRollOverToNewFile) {

Review Comment:
   The max data block size and log file size are configured by `hoodie.logfile.data.block.max.size` (256MB) and `hoodie.logfile.max.size` (1GB) respectively.  And the rollover based on the size already happens in `appendBlocks`.  Can you check that logic?  not sure if the change here is 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] nsivabalan commented on pull request #6157: [HUDI-4431] Fix log file will not roll over to a new file

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

   @XuQianJin-Stars : hey. can you follow up on this. do we need a fix or if its already taken care. let us know. we can close it out.


-- 
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] XuQianJin-Stars commented on a diff in pull request #6157: [HUDI-4431] Fix log file will not roll over to a new file

Posted by GitBox <gi...@apache.org>.
XuQianJin-Stars commented on code in PR #6157:
URL: https://github.com/apache/hudi/pull/6157#discussion_r926518619


##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieLogFormatWriter.java:
##########
@@ -94,7 +94,8 @@ private FSDataOutputStream getOutputStream() throws IOException, InterruptedExce
       Path path = logFile.getPath();
       if (fs.exists(path)) {
         boolean isAppendSupported = StorageSchemes.isAppendSupported(fs.getScheme());
-        if (isAppendSupported) {
+        boolean needRollOverToNewFile = fs.getFileStatus(path).getLen() > sizeThreshold;
+        if (isAppendSupported && !needRollOverToNewFile) {

Review Comment:
   > hi danny, flushToDiskIfRequired cannot work very well in some situation。 in our product env, the log size will roll up to 30g+
   
   I also encountered a log written to 900G 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] XuQianJin-Stars closed pull request #6157: [HUDI-4431] Fix log file will not roll over to a new file

Posted by GitBox <gi...@apache.org>.
XuQianJin-Stars closed pull request #6157: [HUDI-4431] Fix log file will not roll over to a new file
URL: https://github.com/apache/hudi/pull/6157


-- 
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] XuQianJin-Stars commented on pull request #6157: [HUDI-4431] Fix log file will not roll over to a new file

Posted by GitBox <gi...@apache.org>.
XuQianJin-Stars commented on PR #6157:
URL: https://github.com/apache/hudi/pull/6157#issuecomment-1192105101

   > don't think the change is right ~
   
   I will continue to analyze and see how to fix this reasonably.


-- 
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 #6157: [HUDI-4431] Fix log file will not roll over to a new file

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "f08b55659bc994e7aa6ac8793009427ca1f1e82d",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10119",
       "triggerID" : "f08b55659bc994e7aa6ac8793009427ca1f1e82d",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * f08b55659bc994e7aa6ac8793009427ca1f1e82d Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=10119) 
   
   <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 a diff in pull request #6157: [HUDI-4431] Fix log file will not roll over to a new file

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


##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieLogFormatWriter.java:
##########
@@ -94,7 +94,8 @@ private FSDataOutputStream getOutputStream() throws IOException, InterruptedExce
       Path path = logFile.getPath();
       if (fs.exists(path)) {
         boolean isAppendSupported = StorageSchemes.isAppendSupported(fs.getScheme());
-        if (isAppendSupported) {
+        boolean needRollOverToNewFile = fs.getFileStatus(path).getLen() > sizeThreshold;
+        if (isAppendSupported && !needRollOverToNewFile) {

Review Comment:
   Should we modify it here ? `HoodieAppendHandle#canWrite` already take 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 #6157: [HUDI-4431] Fix log file will not roll over to a new file

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

   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] nsivabalan commented on a diff in pull request #6157: [HUDI-4431] Fix log file will not roll over to a new file

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


##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieLogFormatWriter.java:
##########
@@ -94,7 +94,8 @@ private FSDataOutputStream getOutputStream() throws IOException, InterruptedExce
       Path path = logFile.getPath();
       if (fs.exists(path)) {
         boolean isAppendSupported = StorageSchemes.isAppendSupported(fs.getScheme());
-        if (isAppendSupported) {
+        boolean needRollOverToNewFile = fs.getFileStatus(path).getLen() > sizeThreshold;
+        if (isAppendSupported && !needRollOverToNewFile) {

Review Comment:
   @XuQianJin-Stars : any updates on this end. 



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