Class FileEncryptionProperties.Builder

    • 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