deniskuzZ opened a new pull request, #6973: URL: https://github.com/apache/hive/pull/6973
### What changes were proposed in this pull request? IcebergSplit compresses its payload with the codec named by the new `hive.iceberg.split.compression.codec` (`snappy` by default, `zstd` or `none`). The payload is `[codec id][stored length][stored bytes]`; the task group is still Java-serialized as before, only the bytes are compressed. The reader takes the codec from the payload, so only the split generator reads the setting. ### Why are the changes needed? HiveSplitGenerator keeps split payloads in the Tez AM until their total reaches `hive.tez.input.fs.serialization.threshold` (256 MiB); every split after that is written to the staging file system as a file of its own and read back by its task. IcebergSplit serializes each task group as a separate stream, so every split repeats the class descriptors and the schema and partition spec of its tasks: ~5.5 KB per split, of which only 264-568 bytes are unique to it. On a 1TRC table with ~49.6k splits the scan before the DML stays just under the threshold (258 MB in memory, events in 0.1 s); the scans after a V2 / V3 merge-on-read DML go over it (70 / 51 MB written to the file system) and split generation grows from 3.2 s to 16.6 / 11.1 s. ### Does this PR introduce _any_ user-facing change? A new configuration, `hive.iceberg.split.compression.codec`. Split payloads are smaller; a split written by another Hive version cannot be read (AM and tasks run the same build). ### How was this patch tested? TestIcebergSplit: round trip with every codec on a task group with position deletes (locations, start/length, sequence numbers), compression smaller than none, a split without configuration using the default, an unknown codec id failing. TestIcebergInputFormats, TestInputFormatReaderDeletes, TestHiveIcebergSelects, TestHiveIcebergDeletionVectors and TestHiveIcebergVectorization pass with the snappy default (the Tez local runs serialize the split events). Per split, measured locally on the 1TRC table layout: snappy 1.75-1.9x smaller (12x for splits carrying 300 partition-scoped delete files) at ~5 us of AM time per split; zstd 2.1-2.35x (41x) at ~12-15 us. -- 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]
