Class HadoopFSKeyMaterialStore
java.lang.Object
org.apache.parquet.crypto.keytools.HadoopFSKeyMaterialStore
- All Implemented Interfaces:
FileKeyMaterialStore
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddKeyMaterial(String keyIDInFile, String keyMaterial) Add key material for one encryption key.getKeyMaterial(String keyIDInFile) Get key materialvoidinitialize(org.apache.hadoop.fs.Path parquetFilePath, org.apache.hadoop.conf.Configuration hadoopConfig, boolean tempStore) Initializes key material store for a parquet file.voidmoveMaterialTo(FileKeyMaterialStore keyMaterialStore) Move key material to another store.voidRemove key material from persistent store.voidAfter key material was added for all keys in the given Parquet file, save material in persistent store.
-
Field Details
-
KEY_MATERIAL_FILE_PREFIX
- See Also:
-
TEMP_FILE_PREFIX
- See Also:
-
KEY_MATERIAL_FILE_SUFFFIX
- See Also:
-
-
Method Details
-
initialize
public void initialize(org.apache.hadoop.fs.Path parquetFilePath, org.apache.hadoop.conf.Configuration hadoopConfig, boolean tempStore) Description copied from interface:FileKeyMaterialStoreInitializes key material store for a parquet file.- Specified by:
initializein interfaceFileKeyMaterialStore- Parameters:
parquetFilePath- Parquet file pathhadoopConfig- Hadoop configurationtempStore- set true if this is a temporary store, used in key rotation
-
addKeyMaterial
public void addKeyMaterial(String keyIDInFile, String keyMaterial) throws ParquetCryptoRuntimeException Description copied from interface:FileKeyMaterialStoreAdd key material for one encryption key.- Specified by:
addKeyMaterialin interfaceFileKeyMaterialStore- Parameters:
keyIDInFile- ID of the key in Parquet filekeyMaterial- key material- Throws:
ParquetCryptoRuntimeException
-
getKeyMaterial
Description copied from interface:FileKeyMaterialStoreGet key material- Specified by:
getKeyMaterialin interfaceFileKeyMaterialStore- Parameters:
keyIDInFile- ID of a key in Parquet file- Returns:
- key material
- Throws:
ParquetCryptoRuntimeException
-
saveMaterial
Description copied from interface:FileKeyMaterialStoreAfter key material was added for all keys in the given Parquet file, save material in persistent store.- Specified by:
saveMaterialin interfaceFileKeyMaterialStore- Throws:
ParquetCryptoRuntimeException
-
getKeyIDSet
- Specified by:
getKeyIDSetin interfaceFileKeyMaterialStore- Returns:
- Set of all key IDs in this store (for the given Parquet file)
- Throws:
ParquetCryptoRuntimeException
-
removeMaterial
Description copied from interface:FileKeyMaterialStoreRemove key material from persistent store. Used in key rotation.- Specified by:
removeMaterialin interfaceFileKeyMaterialStore- Throws:
ParquetCryptoRuntimeException
-
moveMaterialTo
public void moveMaterialTo(FileKeyMaterialStore keyMaterialStore) throws ParquetCryptoRuntimeException Description copied from interface:FileKeyMaterialStoreMove key material to another store. Used in key rotation.- Specified by:
moveMaterialToin interfaceFileKeyMaterialStore- Parameters:
keyMaterialStore- target store- Throws:
ParquetCryptoRuntimeException
-