the-other-tim-brown commented on code in PR #17831:
URL: https://github.com/apache/hudi/pull/17831#discussion_r2684581651
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/io/storage/HoodieSparkLanceWriter.java:
##########
@@ -151,13 +154,20 @@ protected void populateVectorSchemaRoot(List<InternalRow>
records) {
/**
* Check if writer can accept more records based on file size.
- * Uses filesystem-based size checking (similar to ORC/HFile approach).
+ * Checks the actual file size on storage and compares against the
configured threshold.
*
* @return true if writer can accept more records, false if file size limit
reached
*/
public boolean canWrite() {
- //TODO https://github.com/apache/hudi/issues/17684
- return true;
+ try {
+ if (!storage.exists(path)) {
Review Comment:
The `canWrite` will be called while the file is being written so this will
always return true.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]