ggershinsky commented on code in PR #7770: URL: https://github.com/apache/iceberg/pull/7770#discussion_r1697876636
########## core/src/main/java/org/apache/iceberg/SnapshotProducer.java: ########## @@ -237,10 +244,19 @@ public Snapshot apply() { OutputFile manifestList = manifestListPath(); + EncryptionManager encryptionManager = ops.encryption(); + EncryptedOutputFile encryptedManifestList = encryptionManager.encrypt(manifestList); + + long manifestListSize = 0L; + ByteBuffer manifestListKeyMetadata = + (encryptedManifestList.keyMetadata() == null) + ? null + : encryptedManifestList.keyMetadata().buffer(); + try (ManifestListWriter writer = ManifestLists.write( ops.current().formatVersion(), - manifestList, + encryptedManifestList.encryptingOutputFile(), Review Comment: Per your suggestion below, > I don't think I have a strong preference whether this is delegated to the writer (toManifestListFile()) or just done in a method like ManifestListFile.create(EncryptionManager em, String wrappedKey, ByteBuffer keyMetadataBuffer, String location) Using delegation to ManifestListWriter (`toManifestListFile()` would require passing the encryption manager. I'll implement a static `ManifestListFile.create` method. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org