Package org.apache.hadoop.hdfs.protocol
Class DirectoryListing
java.lang.Object
org.apache.hadoop.hdfs.protocol.DirectoryListing
This class defines a partial listing of a directory to support
iterative directory listing.
-
Constructor Summary
ConstructorsConstructorDescriptionDirectoryListing(HdfsFileStatus[] partialListing, int remainingEntries) constructor -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Get the last name in this listGet the partial listing of file statusintGet the number of remaining entries that are left to be listedbooleanhasMore()Check if there are more entries that are left to be listed
-
Constructor Details
-
DirectoryListing
constructor- Parameters:
partialListing- a partial listing of a directoryremainingEntries- number of entries that are left to be listed
-
-
Method Details
-
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
-