Interface CopyFromLocalOperation.CopyFromLocalOperationCallbacks

All Known Implementing Classes:
S3AFileSystem.CopyFromLocalCallbacksImpl
Enclosing class:
CopyFromLocalOperation

public static interface CopyFromLocalOperation.CopyFromLocalOperationCallbacks
Define the contract for CopyFromLocalOperation to interact with any external resources.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    copyLocalFileFromTo(File file, org.apache.hadoop.fs.Path source, org.apache.hadoop.fs.Path destination)
    Copy / Upload a file from a source path to a destination path.
    boolean
    createEmptyDir(org.apache.hadoop.fs.Path path, StoreContext storeContext)
    Create empty directory at path.
    boolean
    deleteLocal(org.apache.hadoop.fs.Path path, boolean recursive)
    Delete file / directory at path.
    org.apache.hadoop.fs.FileStatus
    getFileStatus(org.apache.hadoop.fs.Path path)
    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

      org.apache.hadoop.fs.RemoteIterator<org.apache.hadoop.fs.LocatedFileStatus> listLocalStatusIterator(org.apache.hadoop.fs.Path path) throws IOException
      List all entries (files AND directories) for a path.
      Parameters:
      path - - path to list
      Returns:
      an iterator for all entries
      Throws:
      IOException - - for any failure
    • getFileStatus

      org.apache.hadoop.fs.FileStatus getFileStatus(org.apache.hadoop.fs.Path path) throws IOException
      Get the file status for a path.
      Parameters:
      path - - target path
      Returns:
      FileStatus
      Throws:
      IOException - - for any failure
    • pathToLocalFile

      File pathToLocalFile(org.apache.hadoop.fs.Path path)
      Get the file from a path.
      Parameters:
      path - - target path
      Returns:
      file at path
    • deleteLocal

      boolean deleteLocal(org.apache.hadoop.fs.Path path, boolean recursive) throws IOException
      Delete file / directory at path.
      Parameters:
      path - - target path
      recursive - - recursive deletion
      Returns:
      boolean result of operation
      Throws:
      IOException - for any failure
    • copyLocalFileFromTo

      void copyLocalFileFromTo(File file, org.apache.hadoop.fs.Path source, org.apache.hadoop.fs.Path destination) throws IOException
      Copy / Upload a file from a source path to a destination path.
      Parameters:
      file - - target file
      source - - source path
      destination - - destination path
      Throws:
      IOException - for any failure
    • createEmptyDir

      boolean createEmptyDir(org.apache.hadoop.fs.Path path, StoreContext storeContext) throws IOException
      Create empty directory at path. Most likely an upload operation.
      Parameters:
      path - - target path
      storeContext - - store context
      Returns:
      boolean result of operation
      Throws:
      IOException - for any failure