Package org.apache.parquet.crypto
Class FileEncryptionProperties.Builder
- java.lang.Object
-
- org.apache.parquet.crypto.FileEncryptionProperties.Builder
-
- Enclosing class:
- FileEncryptionProperties
public static class FileEncryptionProperties.Builder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileEncryptionProperties
build()
FileEncryptionProperties.Builder
withAADPrefix(byte[] aadPrefixBytes)
Set the file AAD Prefix.FileEncryptionProperties.Builder
withAlgorithm(ParquetCipher parquetCipher)
Set encryption algorithm.FileEncryptionProperties.Builder
withEncryptedColumns(Map<org.apache.parquet.hadoop.metadata.ColumnPath,ColumnEncryptionProperties> encryptedColumns)
Set the list of encrypted columns and their properties (keys etc).FileEncryptionProperties.Builder
withFooterKeyID(String keyID)
Set a key retrieval metadata (converted from String).FileEncryptionProperties.Builder
withFooterKeyMetadata(byte[] footerKeyMetadata)
Set a key retrieval metadata.FileEncryptionProperties.Builder
withoutAADPrefixStorage()
Skip storing AAD Prefix in file metadata.FileEncryptionProperties.Builder
withPlaintextFooter()
Create files with plaintext footer.
-
-
-
Method Detail
-
withPlaintextFooter
public FileEncryptionProperties.Builder withPlaintextFooter()
Create files with plaintext footer. If not called, the files will be created with encrypted footer (default).- Returns:
- Builder
-
withAlgorithm
public FileEncryptionProperties.Builder withAlgorithm(ParquetCipher parquetCipher)
Set encryption algorithm. If not called, files will be encrypted with AES_GCM_V1 (default).- Parameters:
parquetCipher
- Encryption algorithm- Returns:
- Builder
-
withFooterKeyID
public FileEncryptionProperties.Builder withFooterKeyID(String keyID)
Set a key retrieval metadata (converted from String). Use either withFooterKeyMetaData or withFooterKeyID, not both.- Parameters:
keyID
- will be converted to metadata (UTF-8 array).- Returns:
- Builder
-
withFooterKeyMetadata
public FileEncryptionProperties.Builder withFooterKeyMetadata(byte[] footerKeyMetadata)
Set a key retrieval metadata. Use either withFooterKeyMetaData or withFooterKeyID, not both.- Parameters:
footerKeyMetadata
- Key metadata- Returns:
- Builder
-
withAADPrefix
public FileEncryptionProperties.Builder withAADPrefix(byte[] aadPrefixBytes)
Set the file AAD Prefix.- Parameters:
aadPrefixBytes
- AAD Prefix- Returns:
- Builder
-
withoutAADPrefixStorage
public FileEncryptionProperties.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
-
build
public FileEncryptionProperties build()
-
-