RussellSpitzer commented on issue #15754: URL: https://github.com/apache/iceberg/issues/15754#issuecomment-4121028993
We use the RollingFileWriter to actually decide when to cut a new file. This is wired directly into the parquet writer's buffers and on disk representation. We check every so often (see the % row_divisor) to see whether the on disk data + buffer has exceed our target file size. RollingFileWriter https://github.com/apache/iceberg/blob/bea3f8b58cebe1458d8edb2172287cae0a04cb38/core/src/main/java/org/apache/iceberg/io/RollingFileWriter.java#L103-L104 ParquetWriter- onDiskSize (pos) + uncompressed unwritten portion (buffered) https://github.com/apache/iceberg/blob/fec9800bcc0c4073ca727f3b3bfdc2f34abb26a3/parquet/src/main/java/org/apache/iceberg/parquet/ParquetWriter.java#L163-L182 Now this is all tied to whether or not the writer has enough data to fill a file and roll over. For example, a spark task with 10GB of uncompressed data which compresses to 10MB will still only write a 10mb file. TLDR; write.target-file-size-bytes is "compressed size". -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
