Skip to content

Conversation

@jackye1995
Copy link
Contributor

@flyrain @rdblue @ggershinsky

first step based on draft #2520, simply add keyMetadata to the interface and implementations, pass in null for any caller.

.add("deleted_data_files_count", deletedFilesCount)
.add("deleted_rows_count", deletedRowsCount)
.add("partitions", partitions)
.add("key_metadata", keyMetadata == null ? "null" : "(redacted)")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would actually be more against using this approach to support redact, for 2 reasons:

  1. this is only for toString. If you really want to see the details of the key metadata you can read through the manifest table, and that should show the information fully if you can decrypt an encrypted manifest list. I think that provides better access control. Changing toString feels to me like opening a backdoor.
  2. if we can encrypt a manifest, we should be able to support redact configuration natively through encryption manager as a part of data masking. When we can do that, you don't need a forked version to use a custom static method for this purpose.

Copy link
Member

@RussellSpitzer RussellSpitzer left a comment

Choose a reason for hiding this comment

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

This looks good to me, do we have anyone else we are waiting on to get this merged? @aokolnychyi ?

Copy link
Contributor

@flyrain flyrain left a comment

Choose a reason for hiding this comment

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

+1, thanks for the PR.

@jackye1995
Copy link
Contributor Author

@RussellSpitzer we are not waiting for anyone to merge, but I thought for any format v2 change @rdblue should take a look and approve. If it's not necessary we will merge to unblock other subsequent changes.

}

@Override
public ByteBuffer keyMetadata() {
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 used in tests? We could just allow this to use the default implementation, unless we added tests that exercise it.

@rdblue rdblue merged commit 8104769 into apache:master Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants