ggershinsky commented on code in PR #14396:
URL: https://github.com/apache/iceberg/pull/14396#discussion_r2463261511
##########
core/src/main/java/org/apache/iceberg/encryption/StandardEncryptionManager.java:
##########
@@ -198,30 +214,19 @@ ByteBuffer encryptedByKey(String manifestListKeyID) {
return
transientState.unwrappedKeyCache.get(encryptedKeyMetadata.encryptedById());
}
- ByteBuffer encryptedKeyMetadata(String manifestListKeyID) {
- if (transientState == null) {
- throw new IllegalStateException("Cannot find encrypted key metadata
after serialization");
- }
-
- EncryptedKey encryptedKeyMetadata =
transientState.encryptionKeys.get(manifestListKeyID);
- if (encryptedKeyMetadata == null) {
- throw new IllegalStateException(
- "Cannot find manifest list key metadata with id " +
manifestListKeyID);
- }
-
- return encryptedKeyMetadata.encryptedKeyMetadata();
- }
-
public String addManifestListKeyMetadata(NativeEncryptionKeyMetadata
keyMetadata) {
if (transientState == null) {
throw new IllegalStateException("Cannot add key metadata after
serialization");
}
String manifestListKeyID = generateKeyId();
+ String keyEncryptionKeyID = keyEncryptionKeyID();
Review Comment:
SGTM
--
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]