Package org.apache.hadoop.fs.s3a
Class S3AFileSystem.CopyFromLocalCallbacksImpl
java.lang.Object
org.apache.hadoop.fs.s3a.S3AFileSystem.CopyFromLocalCallbacksImpl
- All Implemented Interfaces:
CopyFromLocalOperation.CopyFromLocalOperationCallbacks
- Enclosing class:
- S3AFileSystem
protected final class S3AFileSystem.CopyFromLocalCallbacksImpl
extends Object
implements CopyFromLocalOperation.CopyFromLocalOperationCallbacks
-
Method Summary
Modifier and TypeMethodDescriptionvoidcopyLocalFileFromTo(File file, org.apache.hadoop.fs.Path from, org.apache.hadoop.fs.Path to) Copy / Upload a file from a source path to a destination path.booleancreateEmptyDir(org.apache.hadoop.fs.Path path, StoreContext storeContext) Create empty directory at path.booleandeleteLocal(org.apache.hadoop.fs.Path path, boolean recursive) Delete file / directory at path.org.apache.hadoop.fs.FileStatusgetFileStatus(org.apache.hadoop.fs.Path f) Get the file status for a path.org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.LocatedFileStatus>listLocalStatusIterator(org.apache.hadoop.fs.Path path) List all entries (files AND directories) for a path.pathToLocalFile(org.apache.hadoop.fs.Path path) Get the file from a path.
-
Method Details
-
listLocalStatusIterator
public org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.LocatedFileStatus> listLocalStatusIterator(org.apache.hadoop.fs.Path path) throws IOException Description copied from interface:CopyFromLocalOperation.CopyFromLocalOperationCallbacksList all entries (files AND directories) for a path.- Specified by:
listLocalStatusIteratorin interfaceCopyFromLocalOperation.CopyFromLocalOperationCallbacks- Parameters:
path- - path to list- Returns:
- an iterator for all entries
- Throws:
IOException- - for any failure
-
pathToLocalFile
Description copied from interface:CopyFromLocalOperation.CopyFromLocalOperationCallbacksGet the file from a path.- Specified by:
pathToLocalFilein interfaceCopyFromLocalOperation.CopyFromLocalOperationCallbacks- Parameters:
path- - target path- Returns:
- file at path
-
deleteLocal
Description copied from interface:CopyFromLocalOperation.CopyFromLocalOperationCallbacksDelete file / directory at path.- Specified by:
deleteLocalin interfaceCopyFromLocalOperation.CopyFromLocalOperationCallbacks- Parameters:
path- - target pathrecursive- - recursive deletion- Returns:
- boolean result of operation
- Throws:
IOException- for any failure
-
copyLocalFileFromTo
@RetryTranslated public void copyLocalFileFromTo(File file, org.apache.hadoop.fs.Path from, org.apache.hadoop.fs.Path to) throws IOException Description copied from interface:CopyFromLocalOperation.CopyFromLocalOperationCallbacksCopy / Upload a file from a source path to a destination path.- Specified by:
copyLocalFileFromToin interfaceCopyFromLocalOperation.CopyFromLocalOperationCallbacks- Parameters:
file- - target filefrom- - source pathto- - destination path- Throws:
IOException- for any failure
-
getFileStatus
@RetryTranslated public org.apache.hadoop.fs.FileStatus getFileStatus(org.apache.hadoop.fs.Path f) throws IOException Description copied from interface:CopyFromLocalOperation.CopyFromLocalOperationCallbacksGet the file status for a path.- Specified by:
getFileStatusin interfaceCopyFromLocalOperation.CopyFromLocalOperationCallbacks- Parameters:
f- - target path- Returns:
- FileStatus
- Throws:
IOException- - for any failure
-
createEmptyDir
@RetryTranslated public boolean createEmptyDir(org.apache.hadoop.fs.Path path, StoreContext storeContext) throws IOException Description copied from interface:CopyFromLocalOperation.CopyFromLocalOperationCallbacksCreate empty directory at path. Most likely an upload operation.- Specified by:
createEmptyDirin interfaceCopyFromLocalOperation.CopyFromLocalOperationCallbacks- Parameters:
path- - target pathstoreContext- - store context- Returns:
- boolean result of operation
- Throws:
IOException- for any failure
-