Skip to content
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

ORC-485. Add API to write encrypted files. #386

Closed
wants to merge 2 commits into from

Conversation

omalley
Copy link
Contributor

@omalley omalley commented Apr 20, 2019

These changes provide most of the API changes for column encryption.

@omalley omalley force-pushed the orc-485 branch 2 times, most recently from b236036 to ded9b20 Compare April 22, 2019 22:49
@omalley omalley force-pushed the orc-485 branch 3 times, most recently from 737bb63 to 1709627 Compare May 3, 2019 00:07
omalley added a commit to omalley/orc that referenced this pull request May 28, 2019
Fixes apache#386

Change-Id: I0a4d6b86256ee1658c4f52df54679b8f1d6e9433
Signed-off-by: Owen O'Malley <omalley@apache.org>
@omalley
Copy link
Contributor Author

omalley commented May 28, 2019

Any comments on this before I commit it?

Fixes apache#386

Signed-off-by: Owen O'Malley <omalley@apache.org>
Copy link
Contributor

@prasanthj prasanthj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor API changes to call out the scope of the keys explicitly and some nits. rest looks good.

* Get the encryption key for this column.
* @return the encryption key.
*/
EncryptionKey getKey();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use getColumnKey() to be more descriptive? Also the scope of these keys are stripe or file? Can it be explicitly called out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are for the entire file, I'll update the name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More precisely, it is the key description so I updated the name to getKeyDescription.

* Get the local key for the footer.
* @return the local decrypted key or null if it isn't available
*/
Key getFooterKey() throws IOException;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getStripeFooterKey() or if file level getFileFooterKey()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the file footer, so I'll update this name too.

@@ -114,7 +114,7 @@
* Get the statistics about the columns in the file.
* @return the information about the column
*/
ColumnStatistics[] getStatistics();
ColumnStatistics[] getStatistics() throws IOException;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this required? when does this throw exception?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I can't add a throw here without breaking backwards compatibility. In general, we won't throw here, but if the key provider is flaky, we can get an exception. I guess I'll make it an unchecked exception.

@@ -642,6 +642,11 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: required? can we use Objects.requireNotNull instead?

Copy link
Contributor Author

@omalley omalley Jun 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really want an annotation to mark the intent and help with static analysis. I don't need a run time check.

@omalley omalley closed this in f3931fe Jun 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants