hkwi opened a new pull request, #16672: URL: https://github.com/apache/iceberg/pull/16672
## 概要 REST catalog の table operations でも、Hive catalog と同様に Iceberg table encryption を使えるようにします。 この変更では、REST catalog の catalog property から KMS client を生成し、`RESTTableOperations` に渡します。encrypted table では `EncryptionManager` と `EncryptingFileIO` を返し、commit request には `StandardEncryptionManager` が生成した encrypted key を `AddEncryptionKey` update として含めます。 ## 背景 `TableOperations.encryption()` の default は plaintext manager です。現在の REST catalog はこれを override していないため、`encryption.key-id` を持つ table でも REST client 側の書き込み path が plaintext manager に落ちます。 Hive catalog は `KeyManagementClient` を table operations に渡し、commit 前に generated encryption keys を metadata に追加しているため、この PR は REST catalog に同等の wiring を追加します。 ## 変更点 - `RESTSessionCatalog` が `encryption.kms-type` / `encryption.kms-impl` から `KeyManagementClient` を生成し、table ops に渡す - `RESTTableOperations` が encrypted table 向けに `EncryptionManager` / `EncryptingFileIO` を返す - create / replace / simple commit の update request に generated `AddEncryptionKey` を追加する - 既存 encrypted table の `encryption.key-id` 削除・変更を拒否する - REST table load 時の FileIO tracking が KMS 初期化を副作用として起こさないよう、raw `FileIO` を track できる overload を追加する - REST catalog の create transaction / KMS 未設定 / load 境界のテストを追加する ## 検証 - `./gradlew :iceberg-core:compileJava :iceberg-core:compileTestJava :iceberg-core:test --tests org.apache.iceberg.rest.TestRESTCatalog.testEncryptedCreateTransactionAddsEncryptionKeys --tests org.apache.iceberg.rest.TestRESTCatalog.testEncryptedCreateTransactionRequiresKmsClient --tests org.apache.iceberg.rest.TestRESTCatalog.testEncryptedTableLoadDoesNotRequireKmsClient --no-daemon` - `./gradlew :iceberg-core:test --tests org.apache.iceberg.io.TestFileIOTracker --tests org.apache.iceberg.rest.TestRESTCatalog.testCustomTableOperationsInjection --tests org.apache.iceberg.rest.TestFreshnessAwareLoading.customTableOperationsWithFreshnessAwareLoading --no-daemon` - `./gradlew :iceberg-core:spotlessCheck --no-daemon` - `git diff --check` -- 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]
