限定符和类型 | 字段和说明 |
---|---|
static byte[] |
EMPTY_NAME |
构造器和说明 |
---|
HdfsFileStatus()
default constructor
|
HdfsFileStatus(long length,
boolean isdir,
int block_replication,
long blocksize,
long modification_time,
long access_time,
FsPermission permission,
String owner,
String group,
byte[] path)
Constructor
|
限定符和类型 | 方法和说明 |
---|---|
long |
getAccessTime()
Get the access time of the file.
|
long |
getBlockSize()
Get the block size of the file.
|
String |
getFullName(String parent)
Get the string representation of the full path name
|
Path |
getFullPath(Path parent)
Get the full path
|
String |
getGroup()
Get the group associated with the file.
|
long |
getLen()
Get the length of this file, in bytes.
|
String |
getLocalName()
Get the string representation of the local name
|
byte[] |
getLocalNameInBytes()
Get the Java UTF8 representation of the local name
|
long |
getModificationTime()
Get the modification time of the file.
|
String |
getOwner()
Get the owner of the file.
|
FsPermission |
getPermission()
Get FsPermission associated with the file.
|
short |
getReplication()
Get the replication factor of a file.
|
boolean |
isDir()
Is this a directory?
|
boolean |
isEmptyLocalName()
Check if the local name is empty
|
void |
readFields(DataInput in)
Deserialize the fields of this object from
in . |
void |
write(DataOutput out)
Serialize the fields of this object to
out . |
public HdfsFileStatus()
public HdfsFileStatus(long length, boolean isdir, int block_replication, long blocksize, long modification_time, long access_time, FsPermission permission, String owner, String group, byte[] path)
length
- the number of bytes the file hasisdir
- if the path is a directoryblock_replication
- the replication factorblocksize
- the block sizemodification_time
- modification timeaccess_time
- access timepermission
- permissionowner
- the owner of the pathgroup
- the group of the pathpath
- the local name in java UTF8 encoding the same as that in-memorypublic final long getLen()
public final boolean isDir()
public final long getBlockSize()
public final short getReplication()
public final long getModificationTime()
public final long getAccessTime()
public final FsPermission getPermission()
public final String getOwner()
public final String getGroup()
public final boolean isEmptyLocalName()
public final String getLocalName()
public final byte[] getLocalNameInBytes()
public final String getFullName(String parent)
parent
- the parent pathpublic final Path getFullPath(Path parent)
parent
- the parent pathpublic void write(DataOutput out) throws IOException
Writable
out
.write
在接口中 Writable
out
- DataOuput
to serialize this object into.IOException
public void readFields(DataInput in) throws IOException
Writable
in
.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields
在接口中 Writable
in
- DataInput
to deseriablize this object from.IOException
Copyright © 2009 The Apache Software Foundation