You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "aajisaka (via GitHub)" <gi...@apache.org> on 2023/08/30 09:58:35 UTC

[GitHub] [hudi] aajisaka opened a new pull request, #9577: [HUDI-6805] Print detailed error message in clustering

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

   ### Change Logs
   
   If clustering failed, it's not printing the detailed error reason. For example, in #9094, the error message contains the list of failed files but doesn't contain the reason or stacktrace why it failed to write the files.
   
   The exceptions are once stored to `failedRecords` by `WriteStatus#markFailure` method, but they are never accessed or logged. After this change, the exceptions will be printed in the log.
   
   ### Impact
   
   Very little impact.
   
   ### Risk level (write none, low medium or high below)
   
   Low.
   
   ### Documentation Update
   
   No documentation changes required.
   
   ### Contributor's checklist
   
   - [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [x] Change Logs and Impact were stated clearly
   - [x] 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 #9577: [HUDI-6805] Print detailed error message in clustering

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #9577:
URL: https://github.com/apache/hudi/pull/9577#discussion_r1312680578


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/io/storage/row/HoodieRowCreateHandle.java:
##########
@@ -241,6 +242,9 @@ public WriteStatus close() throws IOException {
     stat.setTotalWriteBytes(fileSizeInBytes);
     stat.setFileSizeInBytes(fileSizeInBytes);
     stat.setTotalWriteErrors(writeStatus.getTotalErrorRecords());
+    for (Pair<HoodieRecordDelegate, Throwable> pair : writeStatus.getFailedRecords()) {
+      LOG.error("Failed to write {}", pair.getLeft(), pair.getRight());
+    }

Review Comment:
   So do you think we just print out all the errors or just the first one?



-- 
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] aajisaka commented on a diff in pull request #9577: [HUDI-6805] Print detailed error message in clustering

Posted by "aajisaka (via GitHub)" <gi...@apache.org>.
aajisaka commented on code in PR #9577:
URL: https://github.com/apache/hudi/pull/9577#discussion_r1311043084


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/io/storage/row/HoodieRowCreateHandle.java:
##########
@@ -241,6 +242,9 @@ public WriteStatus close() throws IOException {
     stat.setTotalWriteBytes(fileSizeInBytes);
     stat.setFileSizeInBytes(fileSizeInBytes);
     stat.setTotalWriteErrors(writeStatus.getTotalErrorRecords());
+    for (Pair<HoodieRecordDelegate, Throwable> pair : writeStatus.getFailedRecords()) {
+      LOG.info("Failed to write {}", pair.getLeft(), pair.getRight());

Review Comment:
   Agreed we should use ERROR log level, but using two `{}` doesn't make sense to me.
   
   It will run `Throwable.toString()` and then print only the short description. Stacktrace won't be printed. Instead we should directly pass the Throwable to the logging API.



-- 
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 #9577: [HUDI-6805] Print detailed error message in clustering

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9d1b03d93f9f5bfab485a89e4b3de9aa9cca4f17",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "9d1b03d93f9f5bfab485a89e4b3de9aa9cca4f17",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9d1b03d93f9f5bfab485a89e4b3de9aa9cca4f17 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 #9577: [HUDI-6805] Print detailed error message in clustering

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9d1b03d93f9f5bfab485a89e4b3de9aa9cca4f17",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19550",
       "triggerID" : "9d1b03d93f9f5bfab485a89e4b3de9aa9cca4f17",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9d1b03d93f9f5bfab485a89e4b3de9aa9cca4f17 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19550) 
   
   <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 #9577: [HUDI-6805] Print detailed error message in clustering

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9d1b03d93f9f5bfab485a89e4b3de9aa9cca4f17",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19550",
       "triggerID" : "9d1b03d93f9f5bfab485a89e4b3de9aa9cca4f17",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aab8e18c70e3d488f920659ee8c210fde5bddf1c",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19568",
       "triggerID" : "aab8e18c70e3d488f920659ee8c210fde5bddf1c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9d1b03d93f9f5bfab485a89e4b3de9aa9cca4f17 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19550) 
   * aab8e18c70e3d488f920659ee8c210fde5bddf1c Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19568) 
   
   <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 #9577: [HUDI-6805] Print detailed error message in clustering

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9d1b03d93f9f5bfab485a89e4b3de9aa9cca4f17",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19550",
       "triggerID" : "9d1b03d93f9f5bfab485a89e4b3de9aa9cca4f17",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aab8e18c70e3d488f920659ee8c210fde5bddf1c",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "aab8e18c70e3d488f920659ee8c210fde5bddf1c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9d1b03d93f9f5bfab485a89e4b3de9aa9cca4f17 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19550) 
   * aab8e18c70e3d488f920659ee8c210fde5bddf1c 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 #9577: [HUDI-6805] Print detailed error message in clustering

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9d1b03d93f9f5bfab485a89e4b3de9aa9cca4f17",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19550",
       "triggerID" : "9d1b03d93f9f5bfab485a89e4b3de9aa9cca4f17",
       "triggerType" : "PUSH"
     }, {
       "hash" : "aab8e18c70e3d488f920659ee8c210fde5bddf1c",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19568",
       "triggerID" : "aab8e18c70e3d488f920659ee8c210fde5bddf1c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * aab8e18c70e3d488f920659ee8c210fde5bddf1c Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19568) 
   
   <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 #9577: [HUDI-6805] Print detailed error message in clustering

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9d1b03d93f9f5bfab485a89e4b3de9aa9cca4f17",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19550",
       "triggerID" : "9d1b03d93f9f5bfab485a89e4b3de9aa9cca4f17",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9d1b03d93f9f5bfab485a89e4b3de9aa9cca4f17 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=19550) 
   
   <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] aajisaka commented on a diff in pull request #9577: [HUDI-6805] Print detailed error message in clustering

Posted by "aajisaka (via GitHub)" <gi...@apache.org>.
aajisaka commented on code in PR #9577:
URL: https://github.com/apache/hudi/pull/9577#discussion_r1312701355


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/io/storage/row/HoodieRowCreateHandle.java:
##########
@@ -241,6 +242,9 @@ public WriteStatus close() throws IOException {
     stat.setTotalWriteBytes(fileSizeInBytes);
     stat.setFileSizeInBytes(fileSizeInBytes);
     stat.setTotalWriteErrors(writeStatus.getTotalErrorRecords());
+    for (Pair<HoodieRecordDelegate, Throwable> pair : writeStatus.getFailedRecords()) {
+      LOG.error("Failed to write {}", pair.getLeft(), pair.getRight());
+    }

Review Comment:
   For troubleshooting, I prefer printing out all the errors in the `writeStatus.getFailedRecords()`



-- 
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] aajisaka commented on pull request #9577: [HUDI-6805] Print detailed error message in clustering

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

   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] danny0405 commented on a diff in pull request #9577: [HUDI-6805] Print detailed error message in clustering

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #9577:
URL: https://github.com/apache/hudi/pull/9577#discussion_r1312443728


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/io/storage/row/HoodieRowCreateHandle.java:
##########
@@ -241,6 +242,9 @@ public WriteStatus close() throws IOException {
     stat.setTotalWriteBytes(fileSizeInBytes);
     stat.setFileSizeInBytes(fileSizeInBytes);
     stat.setTotalWriteErrors(writeStatus.getTotalErrorRecords());
+    for (Pair<HoodieRecordDelegate, Throwable> pair : writeStatus.getFailedRecords()) {
+      LOG.error("Failed to write {}", pair.getLeft(), pair.getRight());
+    }

Review Comment:
   Is there any possibility we have too many records to print so the logs are overwhelmed.



-- 
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] SteNicholas commented on a diff in pull request #9577: [HUDI-6805] Print detailed error message in clustering

Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #9577:
URL: https://github.com/apache/hudi/pull/9577#discussion_r1310260534


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/io/storage/row/HoodieRowCreateHandle.java:
##########
@@ -241,6 +242,9 @@ public WriteStatus close() throws IOException {
     stat.setTotalWriteBytes(fileSizeInBytes);
     stat.setFileSizeInBytes(fileSizeInBytes);
     stat.setTotalWriteErrors(writeStatus.getTotalErrorRecords());
+    for (Pair<HoodieRecordDelegate, Throwable> pair : writeStatus.getFailedRecords()) {
+      LOG.info("Failed to write {}", pair.getLeft(), pair.getRight());

Review Comment:
   ```suggestion
         LOG.error("Failed to write {} -> {}", pair.getLeft(), pair.getRight());
   ```



-- 
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] aajisaka commented on a diff in pull request #9577: [HUDI-6805] Print detailed error message in clustering

Posted by "aajisaka (via GitHub)" <gi...@apache.org>.
aajisaka commented on code in PR #9577:
URL: https://github.com/apache/hudi/pull/9577#discussion_r1312545323


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/io/storage/row/HoodieRowCreateHandle.java:
##########
@@ -241,6 +242,9 @@ public WriteStatus close() throws IOException {
     stat.setTotalWriteBytes(fileSizeInBytes);
     stat.setFileSizeInBytes(fileSizeInBytes);
     stat.setTotalWriteErrors(writeStatus.getTotalErrorRecords());
+    for (Pair<HoodieRecordDelegate, Throwable> pair : writeStatus.getFailedRecords()) {
+      LOG.error("Failed to write {}", pair.getLeft(), pair.getRight());
+    }

Review Comment:
   There's low possibility as Hudi doesn't store all the exception in `writeStatus.getFailedRecords()`. By default, 10% of the errors are stored and the percentage is configurable via `hoodie.memory.writestatus.failure.fraction`. Note that the first error is always stored.
   
   



-- 
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] aajisaka commented on a diff in pull request #9577: [HUDI-6805] Print detailed error message in clustering

Posted by "aajisaka (via GitHub)" <gi...@apache.org>.
aajisaka commented on code in PR #9577:
URL: https://github.com/apache/hudi/pull/9577#discussion_r1312701355


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/io/storage/row/HoodieRowCreateHandle.java:
##########
@@ -241,6 +242,9 @@ public WriteStatus close() throws IOException {
     stat.setTotalWriteBytes(fileSizeInBytes);
     stat.setFileSizeInBytes(fileSizeInBytes);
     stat.setTotalWriteErrors(writeStatus.getTotalErrorRecords());
+    for (Pair<HoodieRecordDelegate, Throwable> pair : writeStatus.getFailedRecords()) {
+      LOG.error("Failed to write {}", pair.getLeft(), pair.getRight());
+    }

Review Comment:
   For troubleshooting, I prefer printing out all the errors.



-- 
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] aajisaka commented on pull request #9577: [HUDI-6805] Print detailed error message in clustering

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

   The patch is verified in our end. It successfully printed the error message and stacktraces in one of the customers' environment


-- 
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 #9577: [HUDI-6805] Print detailed error message in clustering

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 merged PR #9577:
URL: https://github.com/apache/hudi/pull/9577


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