Class DirectoryListing

java.lang.Object
org.apache.hadoop.hdfs.protocol.DirectoryListing

@Private @Evolving public class DirectoryListing extends Object
This class defines a partial listing of a directory to support iterative directory listing.
  • Constructor Details

    • DirectoryListing

      public DirectoryListing(HdfsFileStatus[] partialListing, int remainingEntries)
      constructor
      Parameters:
      partialListing - a partial listing of a directory
      remainingEntries - number of entries that are left to be listed
  • Method Details

    • getPartialListing

      public HdfsFileStatus[] getPartialListing()
      Get the partial listing of file status
      Returns:
      the partial listing of file status
    • getRemainingEntries

      public int getRemainingEntries()
      Get the number of remaining entries that are left to be listed
      Returns:
      the number of remaining entries that are left to be listed
    • hasMore

      public boolean hasMore()
      Check if there are more entries that are left to be listed
      Returns:
      true if there are more entries that are left to be listed; return false otherwise.
    • getLastName

      public byte[] getLastName()
      Get the last name in this list
      Returns:
      the last name in the list if it is not empty; otherwise return null