Class PartialListing<T extends FileStatus>

java.lang.Object
org.apache.hadoop.fs.PartialListing<T>

@Public @Unstable public class PartialListing<T extends FileStatus> extends Object
A partial listing of the children of a parent directory. Since it is a partial listing, multiple PartialListing may need to be combined to obtain the full listing of a parent directory.

ListingBatch behaves similar to a Future, in that getting the result via get() will throw an Exception if there was a failure.

  • Constructor Details

    • PartialListing

      public PartialListing(Path listedPath, List<T> partialListing)
    • PartialListing

      public PartialListing(Path listedPath, org.apache.hadoop.ipc.RemoteException exception)
  • Method Details

    • get

      public List<T> get() throws IOException
      Partial listing of the path being listed. In the case where the path is a file. The list will be a singleton with the file itself.
      Returns:
      Partial listing of the path being listed.
      Throws:
      IOException - if there was an exception getting the listing.
    • getListedPath

      public Path getListedPath()
      Path being listed.
      Returns:
      the path being listed.
    • toString

      public String toString()
      Overrides:
      toString in class Object