Package org.apache.parquet.crypto
Class FileEncryptionProperties.Builder
java.lang.Object
org.apache.parquet.crypto.FileEncryptionProperties.Builder
- Enclosing class:
- FileEncryptionProperties
-
Method Summary
Modifier and TypeMethodDescriptionbuild()withAADPrefix(byte[] aadPrefixBytes) Set the file AAD Prefix.withAlgorithm(ParquetCipher parquetCipher) Set encryption algorithm.withEncryptedColumns(Map<org.apache.parquet.hadoop.metadata.ColumnPath, ColumnEncryptionProperties> encryptedColumns) Set the list of encrypted columns and their properties (keys etc).withFooterKeyID(String keyID) Set a key retrieval metadata (converted from String).withFooterKeyMetadata(byte[] footerKeyMetadata) Set a key retrieval metadata.Skip storing AAD Prefix in file metadata.Create files with plaintext footer.
-
Method Details
-
withAlgorithm
Set encryption algorithm. If not called, files will be encrypted with AES_GCM_V1 (default).- Parameters:
parquetCipher- Encryption algorithm- Returns:
- Builder
-
withAADPrefix
Set the file AAD Prefix.- Parameters:
aadPrefixBytes- AAD Prefix- Returns:
- Builder
-
withoutAADPrefixStorage
Skip storing AAD Prefix in file metadata. If not called, and if AAD Prefix is set, it will be stored.- Returns:
- Builder
-
withEncryptedColumns
public FileEncryptionProperties.Builder withEncryptedColumns(Map<org.apache.parquet.hadoop.metadata.ColumnPath, ColumnEncryptionProperties> encryptedColumns) Set the list of encrypted columns and their properties (keys etc). If not called, all columns will be encrypted with the footer key. If called, the file columns not in the list will be left unencrypted.- Parameters:
encryptedColumns- Columns to be encrypted- Returns:
- Builder
-
withCompleteColumnEncryption
-
build