Class S3JobArchiverImpl
- java.lang.Object
-
- com.netflix.genie.common.internal.services.impl.S3JobArchiverImpl
-
- All Implemented Interfaces:
JobArchiver
public class S3JobArchiverImpl extends java.lang.Object implements JobArchiver
Implementation ofJobArchiveService
for S3 destinations.- Since:
- 4.0.0
-
-
Constructor Summary
Constructors Constructor Description S3JobArchiverImpl(S3ClientFactory s3ClientFactory)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
archiveDirectory(@NotNull java.nio.file.Path directory, java.util.List<java.io.File> filesList, @NotNull java.net.URI target)
Attempt to archive a directory located atdirectory
to thetarget
.
-
-
-
Constructor Detail
-
S3JobArchiverImpl
public S3JobArchiverImpl(S3ClientFactory s3ClientFactory)
Constructor.- Parameters:
s3ClientFactory
- The factory to use to get S3 client instances for a given S3 bucket.
-
-
Method Detail
-
archiveDirectory
public boolean archiveDirectory(@NotNull @NotNull java.nio.file.Path directory, java.util.List<java.io.File> filesList, @NotNull @NotNull java.net.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
-
-