Interface LocatedFileStatus

  • All Superinterfaces:
    FileStatus
    All Known Implementing Classes:
    LocalFileStatus

    @Public
    public interface LocatedFileStatus
    extends FileStatus
    A LocatedFileStatus is a FileStatus that contains additionally the location information of the file directly. The information is accessible through the getBlockLocations() method.

    This class eagerly communicates the block information (including locations) when that information is readily (or cheaply) available. That way users can avoid an additional call to FileSystem.getFileBlockLocations(FileStatus, long, long), which is an additional RPC call for each file.

    • Method Detail

      • getBlockLocations

        BlockLocation[] getBlockLocations()
        Gets the location information for the file. The location is per block, because each block may live potentially at a different location.

        Files without location information typically expose one block with no host information for that block.