Class FileSystemJobArchiverImpl
java.lang.Object
com.netflix.genie.common.internal.services.impl.FileSystemJobArchiverImpl
- All Implemented Interfaces:
JobArchiver
An implementation of
JobArchiver
which attempts to copy the job directory somewhere else on the file
system for backup. A convenient example of this would be a NFS mounted to the Genie host.- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
archiveDirectory
(Path directory, List<File> filesList, URI target) Attempt to archive a directory located atdirectory
to thetarget
.
-
Constructor Details
-
FileSystemJobArchiverImpl
public FileSystemJobArchiverImpl()
-
-
Method Details
-
archiveDirectory
public boolean archiveDirectory(Path directory, List<File> filesList, URI target) throws JobArchiveException Attempt to archive a directory located atdirectory
to thetarget
. All existing data "under"target
should be assumed to be overwritten/replaced.- Specified by:
archiveDirectory
in interfaceJobArchiver
- Parameters:
directory
- The directory to archivefilesList
- The list of files to archivetarget
- The root of a writable location to archive to.- Returns:
false
if this implementation doesn't support archiving totarget
.true
if does support archiving totarget
and the archival was successful- Throws:
JobArchiveException
- If an exception happened during archival
-