public class LocalFileTransferImpl extends java.lang.Object implements FileTransfer
| Constructor and Description |
|---|
LocalFileTransferImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
getFile(java.lang.String srcRemotePath,
java.lang.String dstLocalPath)
Gets a file from any remote location to Genie's local working directory.
|
long |
getLastModifiedTime(java.lang.String path)
Returns the last modified time of the file with the given path.
|
boolean |
isValid(java.lang.String fileName)
This method validates whether it can handle operations for a particular file
based on the prefix of the file like s3://, hdfs:// etc.
|
void |
putFile(java.lang.String srcLocalPath,
java.lang.String dstRemotePath)
Puts a file from Genie's local working directory to a remote location.
|
public boolean isValid(@NotBlank(message="Filename cannot be blank")
java.lang.String fileName)
throws GenieException
isValid in interface FileTransferfileName - file name to validateGenieException - if there are errorspublic 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)
throws GenieException
getFile in interface FileTransfersrcRemotePath - Source path of the files to copydstLocalPath - Destination path of the files to copy toGenieException - exception in case of an errorpublic void putFile(@NotBlank(message="Source local path cannot be empty.")
java.lang.String srcLocalPath,
@NotBlank(message="Destination remote path cannot be empty")
java.lang.String dstRemotePath)
throws GenieException
putFile in interface FileTransfersrcLocalPath - Source path of the files to copydstRemotePath - Destination path of the files to copy toGenieException - exception in case of an errorpublic long getLastModifiedTime(java.lang.String path)
throws GenieException
getLastModifiedTime in interface FileTransferpath - location of the fileGenieException - exception in case of IO error