Interface FileKeyMaterialStore
-
- All Known Implementing Classes:
HadoopFSKeyMaterialStore
public interface FileKeyMaterialStore
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addKeyMaterial(String keyIDInFile, String keyMaterial)
Add key material for one encryption key.Set<String>
getKeyIDSet()
String
getKeyMaterial(String keyIDInFile)
Get key materialvoid
initialize(org.apache.hadoop.fs.Path parquetFilePath, org.apache.hadoop.conf.Configuration hadoopConfig, boolean tempStore)
Initializes key material store for a parquet file.void
moveMaterialTo(FileKeyMaterialStore targetKeyMaterialStore)
Move key material to another store.void
removeMaterial()
Remove key material from persistent store.void
saveMaterial()
After key material was added for all keys in the given Parquet file, save material in persistent store.
-
-
-
Method Detail
-
initialize
void initialize(org.apache.hadoop.fs.Path parquetFilePath, org.apache.hadoop.conf.Configuration hadoopConfig, boolean tempStore)
Initializes key material store for a parquet file.- Parameters:
parquetFilePath
- Parquet file pathhadoopConfig
- Hadoop configurationtempStore
- set true if this is a temporary store, used in key rotation
-
addKeyMaterial
void addKeyMaterial(String keyIDInFile, String keyMaterial)
Add key material for one encryption key.- Parameters:
keyIDInFile
- ID of the key in Parquet filekeyMaterial
- key material
-
saveMaterial
void saveMaterial()
After key material was added for all keys in the given Parquet file, save material in persistent store.
-
getKeyMaterial
String getKeyMaterial(String keyIDInFile)
Get key material- Parameters:
keyIDInFile
- ID of a key in Parquet file- Returns:
- key material
-
getKeyIDSet
Set<String> getKeyIDSet()
- Returns:
- Set of all key IDs in this store (for the given Parquet file)
-
removeMaterial
void removeMaterial()
Remove key material from persistent store. Used in key rotation.
-
moveMaterialTo
void moveMaterialTo(FileKeyMaterialStore targetKeyMaterialStore)
Move key material to another store. Used in key rotation.- Parameters:
targetKeyMaterialStore
- target store
-
-