public class CatalogBackupPlugin extends Object implements PostIngestPlugin
The root backup directory and subdirectory levels can be configured in the Backup Post-Ingest Plugin section in the admin console.
This feature can be installed/uninstalled with the following commands:
ddf@local>feature:install catalog-core-backupplugin ddf@local>feature:uninstall catalog-core-backupplugin
Modifier and Type | Field and Description |
---|---|
static String |
CREATE |
static String |
DELETE |
Constructor and Description |
---|
CatalogBackupPlugin() |
Modifier and Type | Method and Description |
---|---|
String |
getRootBackupDir() |
int |
getSubDirLevels() |
long |
getTerminationTimeoutSeconds() |
CreateResponse |
process(CreateResponse input)
Backs up created metacards to the file system backup.
|
DeleteResponse |
process(DeleteResponse input)
Removes deleted metacards from the file system backup.
|
UpdateResponse |
process(UpdateResponse input)
Backs up updated metacards to the file system backup.
|
void |
setExecutor(ExecutorService executor) |
void |
setRootBackupDir(String dir)
Sets the root file system backup directory.
|
void |
setSubDirLevels(int levels)
Sets the number of subdirectory levels to create.
|
void |
setTerminationTimeoutSeconds(long terminationTimeoutSeconds) |
void |
shutdown() |
public static final String CREATE
public static final String DELETE
public CreateResponse process(CreateResponse input)
process
in interface PostIngestPlugin
input
- the CreateResponse
to processCreateResponse
public UpdateResponse process(UpdateResponse input)
process
in interface PostIngestPlugin
input
- the UpdateResponse
to processUpdateResponse
public DeleteResponse process(DeleteResponse input)
process
in interface PostIngestPlugin
input
- the DeleteResponse
to processDeleteResponse
public void shutdown()
IllegalStateException
- will be thrown if the tasks in the queue have not completed
before the awaitTermination message times outpublic void setExecutor(ExecutorService executor)
public long getTerminationTimeoutSeconds()
public void setTerminationTimeoutSeconds(long terminationTimeoutSeconds)
public String getRootBackupDir()
public void setRootBackupDir(String dir)
dir
- absolute path for the root file system backup directory.public int getSubDirLevels()
public void setSubDirLevels(int levels)
levels
- number of subdirectory levels to createThis work is licensed under a Creative Commons Attribution 4.0 International License.