public class CacheGenieFileTransferService extends GenieFileTransferService
| Constructor and Description |
|---|
CacheGenieFileTransferService(@NotNull FileTransferFactory fileTransferFactory,
@NotNull java.lang.String baseCacheLocation,
@NotNull LocalFileTransferImpl localFileTransfer,
@NotNull io.micrometer.core.instrument.MeterRegistry registry)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.nio.file.Path |
createDirectories(java.lang.String path) |
protected void |
deleteFile(java.io.File file) |
void |
getFile(@NotBlank(message="Source file path cannot be empty.") java.lang.String srcRemotePath,
@NotBlank(message="Destination local path cannot be empty") java.lang.String dstLocalPath)
Get the file needed by Genie for job execution.
|
protected java.io.File |
loadFile(java.lang.String path)
Loads the file given the path and stores it under the cache location with file name as UUID string created using
the path.
|
putFilepublic CacheGenieFileTransferService(@NotNull
@NotNull FileTransferFactory fileTransferFactory,
@NotNull
@NotNull java.lang.String baseCacheLocation,
@NotNull
@NotNull LocalFileTransferImpl localFileTransfer,
@NotNull
@NotNull io.micrometer.core.instrument.MeterRegistry registry)
throws com.netflix.genie.common.exceptions.GenieException
fileTransferFactory - file transfer implementation factorybaseCacheLocation - file cache locationlocalFileTransfer - Local file transfer serviceregistry - spectator registrycom.netflix.genie.common.exceptions.GenieException - If there is any problempublic void getFile(@NotBlank(message="Source file path cannot be empty.")
@NotBlank(message="Source file path cannot be empty.") java.lang.String srcRemotePath,
@NotBlank(message="Destination local path cannot be empty")
@NotBlank(message="Destination local path cannot be empty") java.lang.String dstLocalPath)
throws com.netflix.genie.common.exceptions.GenieException
getFile in class GenieFileTransferServicesrcRemotePath - Path of the file in the remote location to be fetcheddstLocalPath - Local path where the file needs to be placedcom.netflix.genie.common.exceptions.GenieException - If there is any problemprotected void deleteFile(java.io.File file)
throws java.io.IOException
java.io.IOExceptionprotected java.nio.file.Path createDirectories(java.lang.String path)
throws com.netflix.genie.common.exceptions.GenieException
com.netflix.genie.common.exceptions.GenieExceptionprotected java.io.File loadFile(java.lang.String path)
throws com.netflix.genie.common.exceptions.GenieException
path - Path of the file to be loadedcom.netflix.genie.common.exceptions.GenieException - Exception if the file does not load