-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic manifest encryption #8252
Conversation
754a597
to
e0c55d9
Compare
73892a1
to
afa086b
Compare
update unitest cleanup update comments update manifest encryption fix benchmark compilation undo spark 3.4 changes wrong constructor add constructor for old spark tests leverage EncryptingFileIO
afa086b
to
d0d9d28
Compare
@@ -290,7 +295,7 @@ static class V1Writer extends ManifestWriter<DataFile> { | |||
private final V1Metadata.IndexedManifestEntry entryWrapper; | |||
|
|||
V1Writer(PartitionSpec spec, OutputFile file, Long snapshotId) { | |||
super(spec, file, snapshotId); | |||
super(spec, EncryptedFiles.plainAsEncryptedOutput(file), snapshotId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo: accept EncryptedOutputFile, and throw exception if key metadata is not null / empty.
core/src/main/java/org/apache/iceberg/encryption/AesGcmOutputStream.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/iceberg/encryption/AesGcmOutputStream.java
Show resolved
Hide resolved
api/src/main/java/org/apache/iceberg/io/PositionOutputStream.java
Outdated
Show resolved
Hide resolved
@rdblue @RussellSpitzer thanks for the comments. The last commit addresses them. |
@@ -499,21 +500,34 @@ protected OutputFile manifestListPath() { | |||
"snap-%d-%d-%s", snapshotId(), attempt.incrementAndGet(), commitUUID)))); | |||
} | |||
|
|||
/** | |||
* @deprecated since 1.6.0 . Will be removed in 1.7.0. Use {@link |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we usually add in the deprecation notes right before release (I don't think there will be a 1.6 or 1.7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we do want to add these right away. If we don't have a 1.7 then we'll rewrite to "removed in 2.0"
core/src/test/java/org/apache/iceberg/TestManifestEncryption.java
Outdated
Show resolved
Hide resolved
core/src/test/java/org/apache/iceberg/TestManifestEncryption.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few comments for issues to fix, but overall I don't think there is anything major. There's a potential NPE and I don't think we should disallow encryption for v1 tables.
Co-authored-by: Ryan Blue <blue@apache.org>
|
||
private static final DataFile DATA_FILE = | ||
new GenericDataFile( | ||
0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: this should also be SPEC.specId()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I'll fix this in the next patch.
The basics, and support for Spark core. No support yet for Flink or for Spark actions, benchmarks or procedures.