Class JobArchiveServiceImpl
java.lang.Object
com.netflix.genie.common.internal.services.impl.JobArchiveServiceImpl
- All Implemented Interfaces:
JobArchiveService
Default implementation of the
JobArchiveService
.- Since:
- 4.0.0
-
Field Summary
Fields inherited from interface com.netflix.genie.common.internal.services.JobArchiveService
MANIFEST_DIRECTORY, MANIFEST_NAME
-
Constructor Summary
ConstructorDescriptionJobArchiveServiceImpl
(List<JobArchiver> jobArchivers, DirectoryManifest.Factory directoryManifestFactory) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
archiveDirectory
(Path directory, URI target) Backup the contents of the given directory to the target location.
-
Constructor Details
-
JobArchiveServiceImpl
public JobArchiveServiceImpl(List<JobArchiver> jobArchivers, DirectoryManifest.Factory directoryManifestFactory) Constructor.- Parameters:
jobArchivers
- The ordered list ofJobArchiver
implementations to use. Not empty.directoryManifestFactory
- The job directory manifest factory
-
-
Method Details
-
archiveDirectory
Backup the contents of the given directory to the target location. This will recursively backup ALL the files and sub-directories within the given directory to the target.- Specified by:
archiveDirectory
in interfaceJobArchiveService
- Parameters:
directory
-Path
to the directory to archivetarget
- targetURI
for the root archive location- Throws:
JobArchiveException
- if archival fails
-