[GitHub] [hudi] aajisaka commented on a diff in pull request #9577: [HUDI-6805] Print detailed error message in clustering

2023-09-01 Thread via GitHub


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 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-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [hudi] aajisaka commented on a diff in pull request #9577: [HUDI-6805] Print detailed error message in clustering

2023-09-01 Thread via GitHub


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 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-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [hudi] aajisaka commented on a diff in pull request #9577: [HUDI-6805] Print detailed error message in clustering

2023-08-31 Thread via GitHub


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 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-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [hudi] aajisaka commented on a diff in pull request #9577: [HUDI-6805] Print detailed error message in clustering

2023-08-30 Thread via GitHub


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 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-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org