Class LocalFileStatus

    • Constructor Detail

      • LocalFileStatus

        public LocalFileStatus​(File f,
                               FileSystem fs)
        Creates a LocalFileStatus object from a given File object.
        Parameters:
        f - the File object this LocalFileStatus refers to
        fs - the file system the corresponding file has been read from
    • Method Detail

      • getAccessTime

        public long getAccessTime()
        Description copied from interface: FileStatus
        Get the access time of the file.
        Specified by:
        getAccessTime in interface FileStatus
        Returns:
        the access time of file in milliseconds since January 1, 1970 UTC.
      • getBlockSize

        public long getBlockSize()
        Description copied from interface: FileStatus
        Get the block size of the file.
        Specified by:
        getBlockSize in interface FileStatus
        Returns:
        the number of bytes
      • getLen

        public long getLen()
        Description copied from interface: FileStatus
        Return the length of this file.
        Specified by:
        getLen in interface FileStatus
        Returns:
        the length of this file
      • getModificationTime

        public long getModificationTime()
        Description copied from interface: FileStatus
        Get the modification time of the file.
        Specified by:
        getModificationTime in interface FileStatus
        Returns:
        the modification time of file in milliseconds since January 1, 1970 UTC.
      • getReplication

        public short getReplication()
        Description copied from interface: FileStatus
        Get the replication factor of a file.
        Specified by:
        getReplication in interface FileStatus
        Returns:
        the replication factor of a file.
      • isDir

        public boolean isDir()
        Description copied from interface: FileStatus
        Checks if this object represents a directory.
        Specified by:
        isDir in interface FileStatus
        Returns:
        true if this is a directory, false otherwise
      • getPath

        public Path getPath()
        Description copied from interface: FileStatus
        Returns the corresponding Path to the FileStatus.
        Specified by:
        getPath in interface FileStatus
        Returns:
        the corresponding Path to the FileStatus
      • getBlockLocations

        public BlockLocation[] getBlockLocations()
        Description copied from interface: LocatedFileStatus
        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.

        Specified by:
        getBlockLocations in interface LocatedFileStatus
      • getFile

        public File getFile()