@InterfaceAudience.Public @InterfaceStability.Evolving public class LocatedFileStatus extends FileStatus
NONE
Constructor and Description |
---|
LocatedFileStatus() |
LocatedFileStatus(FileStatus stat,
BlockLocation[] locations)
Constructor
|
LocatedFileStatus(long length,
boolean isdir,
int block_replication,
long blocksize,
long modification_time,
long access_time,
FsPermission permission,
String owner,
String group,
Path symlink,
Path path,
BlockLocation[] locations)
Deprecated.
|
LocatedFileStatus(long length,
boolean isdir,
int block_replication,
long blocksize,
long modification_time,
long access_time,
FsPermission permission,
String owner,
String group,
Path symlink,
Path path,
boolean hasAcl,
boolean isEncrypted,
boolean isErasureCoded,
BlockLocation[] locations)
Constructor.
|
LocatedFileStatus(long length,
boolean isdir,
int block_replication,
long blocksize,
long modification_time,
long access_time,
FsPermission permission,
String owner,
String group,
Path symlink,
Path path,
Set<org.apache.hadoop.fs.FileStatus.AttrFlags> attr,
BlockLocation[] locations)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(FileStatus o)
Compare this FileStatus to another FileStatus
|
boolean |
equals(Object o)
Compare if this object is equal to another object
|
BlockLocation[] |
getBlockLocations()
Get the file's block locations
In HDFS, the returned BlockLocation will have different formats for
replicated and erasure coded file.
|
int |
hashCode()
Returns a hash code value for the object, which is defined as
the hash code of the path name.
|
protected void |
setBlockLocations(BlockLocation[] locations)
Hook for subclasses to lazily set block locations.
|
attributes, compareTo, getAccessTime, getBlockSize, getGroup, getLen, getModificationTime, getOwner, getPath, getPermission, getReplication, getSymlink, hasAcl, isDir, isDirectory, isEncrypted, isErasureCoded, isFile, isSnapshotEnabled, isSymlink, readFields, setGroup, setOwner, setPath, setPermission, setSymlink, toString, validateObject, write
public LocatedFileStatus()
public LocatedFileStatus(FileStatus stat, BlockLocation[] locations)
stat
- a file statuslocations
- a file's block locations@Deprecated public LocatedFileStatus(long length, boolean isdir, int block_replication, long blocksize, long modification_time, long access_time, FsPermission permission, String owner, String group, Path symlink, Path path, BlockLocation[] locations)
length
- a file's lengthisdir
- if the path is a directoryblock_replication
- the file's replication factorblocksize
- a file's block sizemodification_time
- a file's modification timeaccess_time
- a file's access timepermission
- a file's permissionowner
- a file's ownergroup
- a file's groupsymlink
- symlink if the path is a symbolic linkpath
- the path's qualified namelocations
- a file's block locationspublic LocatedFileStatus(long length, boolean isdir, int block_replication, long blocksize, long modification_time, long access_time, FsPermission permission, String owner, String group, Path symlink, Path path, boolean hasAcl, boolean isEncrypted, boolean isErasureCoded, BlockLocation[] locations)
length
- a file's lengthisdir
- if the path is a directoryblock_replication
- the file's replication factorblocksize
- a file's block sizemodification_time
- a file's modification timeaccess_time
- a file's access timepermission
- a file's permissionowner
- a file's ownergroup
- a file's groupsymlink
- symlink if the path is a symbolic linkpath
- the path's qualified namehasAcl
- entity has associated ACLsisEncrypted
- entity is encryptedisErasureCoded
- entity is erasure codedlocations
- a file's block locationspublic LocatedFileStatus(long length, boolean isdir, int block_replication, long blocksize, long modification_time, long access_time, FsPermission permission, String owner, String group, Path symlink, Path path, Set<org.apache.hadoop.fs.FileStatus.AttrFlags> attr, BlockLocation[] locations)
length
- a file's lengthisdir
- if the path is a directoryblock_replication
- the file's replication factorblocksize
- a file's block sizemodification_time
- a file's modification timeaccess_time
- a file's access timepermission
- a file's permissionowner
- a file's ownergroup
- a file's groupsymlink
- symlink if the path is a symbolic linkpath
- the path's qualified nameattr
- Attribute flags (See FileStatus.AttrFlags
).locations
- a file's block locationspublic BlockLocation[] getBlockLocations()
FileSystem.getFileBlockLocations(FileStatus, long, long)
for more details.protected void setBlockLocations(BlockLocation[] locations)
locations
field should be null before this is called.locations
- Block locations for this instance.public int compareTo(FileStatus o)
compareTo
in class FileStatus
o
- the FileStatus to be compared.public boolean equals(Object o)
equals
in class FileStatus
o
- the object to be compared.public int hashCode()
hashCode
in class FileStatus
Copyright © 2023 Apache Software Foundation. All rights reserved.