public final class HadoopFileStatus extends Object implements FileStatus
FileStatus
interface for the
Hadoop Distribution File System.Constructor and Description |
---|
HadoopFileStatus(org.apache.hadoop.fs.FileStatus fileStatus)
Creates a new file status from an HDFS file status.
|
Modifier and Type | Method and Description |
---|---|
long |
getAccessTime()
Get the access time of the file.
|
long |
getBlockSize()
Get the block size of the file.
|
org.apache.hadoop.fs.FileStatus |
getInternalFileStatus() |
long |
getLen()
Return the length of this file.
|
long |
getModificationTime()
Get the modification time of the file.
|
Path |
getPath()
Returns the corresponding Path to the FileStatus.
|
short |
getReplication()
Get the replication factor of a file.
|
boolean |
isDir()
Checks if this object represents a directory.
|
public HadoopFileStatus(org.apache.hadoop.fs.FileStatus fileStatus)
fileStatus
- the HDFS file statuspublic long getLen()
FileStatus
getLen
in interface FileStatus
public long getBlockSize()
FileStatus
getBlockSize
in interface FileStatus
public long getAccessTime()
FileStatus
getAccessTime
in interface FileStatus
public long getModificationTime()
FileStatus
getModificationTime
in interface FileStatus
public short getReplication()
FileStatus
getReplication
in interface FileStatus
public org.apache.hadoop.fs.FileStatus getInternalFileStatus()
public Path getPath()
FileStatus
getPath
in interface FileStatus
public boolean isDir()
FileStatus
isDir
in interface FileStatus
true
if this is a directory, false
otherwiseCopyright © 2014–2020 The Apache Software Foundation. All rights reserved.