alexeykudinkin opened a new pull request #5129: URL: https://github.com/apache/hudi/pull/5129
## *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 Currently writing t/h Spark DataSource connector, does not respect "hoodie.parquet.max.file.size" setting: in the snippet pasted below i'm trying to limit the file-size to 16Mb, while on disk i'm getting ~80Mb files. The reason for that is that we rely on `ParquetWriter` to control the file size (`canWrite` method), that relies in turn on FileSystem to trace how much was actually written to FS. The problem with this approach is that `ParquetWriter` is writing lazily: It creates instances of `ParquetWriter` which in turn cache the whole record group when `write` methods are invoked and only flushes the data to FS only when closing the Writer (ie when `close`) is invoked. This PR instead rebases `canWrite` to rely on `ParquetWriter::getDataSize` which holistically reflects the size of the records both already written to FS as well as the ones kept in memory. ## 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 already covered by existing tests, such as *(please describe tests)*. ## 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
