public class HadoopFSKeyMaterialStore extends Object implements FileKeyMaterialStore
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_MATERIAL_FILE_PREFIX |
static String |
KEY_MATERIAL_FILE_SUFFFIX |
static String |
TEMP_FILE_PREFIX |
| Modifier and Type | Method and Description |
|---|---|
void |
addKeyMaterial(String keyIDInFile,
String keyMaterial)
Add key material for one encryption key.
|
Set<String> |
getKeyIDSet() |
String |
getKeyMaterial(String keyIDInFile)
Get key material
|
void |
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 keyMaterialStore)
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.
|
public static final String KEY_MATERIAL_FILE_PREFIX
public static final String TEMP_FILE_PREFIX
public static final String KEY_MATERIAL_FILE_SUFFFIX
public void initialize(org.apache.hadoop.fs.Path parquetFilePath,
org.apache.hadoop.conf.Configuration hadoopConfig,
boolean tempStore)
FileKeyMaterialStoreinitialize in interface FileKeyMaterialStoreparquetFilePath - Parquet file pathhadoopConfig - Hadoop configurationtempStore - set true if this is a temporary store, used in key rotationpublic void addKeyMaterial(String keyIDInFile, String keyMaterial) throws ParquetCryptoRuntimeException
FileKeyMaterialStoreaddKeyMaterial in interface FileKeyMaterialStorekeyIDInFile - ID of the key in Parquet filekeyMaterial - key materialParquetCryptoRuntimeExceptionpublic String getKeyMaterial(String keyIDInFile) throws ParquetCryptoRuntimeException
FileKeyMaterialStoregetKeyMaterial in interface FileKeyMaterialStorekeyIDInFile - ID of a key in Parquet fileParquetCryptoRuntimeExceptionpublic void saveMaterial()
throws ParquetCryptoRuntimeException
FileKeyMaterialStoresaveMaterial in interface FileKeyMaterialStoreParquetCryptoRuntimeExceptionpublic Set<String> getKeyIDSet() throws ParquetCryptoRuntimeException
getKeyIDSet in interface FileKeyMaterialStoreParquetCryptoRuntimeExceptionpublic void removeMaterial()
throws ParquetCryptoRuntimeException
FileKeyMaterialStoreremoveMaterial in interface FileKeyMaterialStoreParquetCryptoRuntimeExceptionpublic void moveMaterialTo(FileKeyMaterialStore keyMaterialStore) throws ParquetCryptoRuntimeException
FileKeyMaterialStoremoveMaterialTo in interface FileKeyMaterialStorekeyMaterialStore - target storeParquetCryptoRuntimeExceptionCopyright © 2023 The Apache Software Foundation. All rights reserved.