Class S3JobArchiverImpl
java.lang.Object
com.netflix.genie.common.internal.services.impl.S3JobArchiverImpl
- All Implemented Interfaces:
JobArchiver
Implementation of
JobArchiver
for S3 destinations.-
Constructor Summary
ConstructorsConstructorDescriptionS3JobArchiverImpl
(S3TransferManagerFactory transferManagerFactory) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
archiveDirectory
(@NotNull Path directory, List<File> filesList, @NotNull URI target) Attempt to archive a directory located atdirectory
to thetarget
.
-
Constructor Details
-
S3JobArchiverImpl
Constructor.- Parameters:
transferManagerFactory
- The factory to use to get S3 transfer manager instances for a given S3 bucket.
-
-
Method Details
-
archiveDirectory
public boolean archiveDirectory(@NotNull @NotNull Path directory, List<File> filesList, @NotNull @NotNull 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
-