public class HadoopFileStatus extends Object implements FileStatus
FileStatus
interface for the Hadoop Distributed 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 |
---|---|
static HadoopFileStatus |
fromHadoopStatus(org.apache.hadoop.fs.FileStatus fileStatus)
Creates a new
HadoopFileStatus from Hadoop's FileStatus . |
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 Path getPath()
FileStatus
getPath
in interface FileStatus
public boolean isDir()
FileStatus
isDir
in interface FileStatus
true
if this is a directory, false
otherwisepublic org.apache.hadoop.fs.FileStatus getInternalFileStatus()
public static HadoopFileStatus fromHadoopStatus(org.apache.hadoop.fs.FileStatus fileStatus)
HadoopFileStatus
from Hadoop's FileStatus
.
If Hadoop's file status is located, i.e., it contains block information, then this
method returns an implementation of Flink's LocatedFileStatus
.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.