|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.fs.FileStatus
public class FileStatus
Interface that represents the client side information for a file.
Constructor Summary | |
---|---|
FileStatus()
|
|
FileStatus(long length,
boolean isdir,
int block_replication,
long blocksize,
long modification_time,
long access_time,
FsPermission permission,
String owner,
String group,
Path path)
|
|
FileStatus(long length,
boolean isdir,
int block_replication,
long blocksize,
long modification_time,
Path path)
|
Method Summary | |
---|---|
int |
compareTo(Object o)
Compare this object to another object |
boolean |
equals(Object o)
Compare if this object is equal to another object |
long |
getAccessTime()
Get the access time of the file. |
long |
getBlockSize()
Get the block size of the file. |
String |
getGroup()
Get the group associated with the file. |
long |
getLen()
|
long |
getModificationTime()
Get the modification time of the file. |
String |
getOwner()
Get the owner of the file. |
Path |
getPath()
|
FsPermission |
getPermission()
Get FsPermission associated with the file. |
short |
getReplication()
Get the replication factor of a file. |
int |
hashCode()
Returns a hash code value for the object, which is defined as the hash code of the path name. |
boolean |
isDir()
Is this a directory? |
void |
readFields(DataInput in)
Deserialize the fields of this object from in . |
protected void |
setGroup(String group)
Sets group. |
protected void |
setOwner(String owner)
Sets owner. |
protected void |
setPermission(FsPermission permission)
Sets permission. |
void |
write(DataOutput out)
Serialize the fields of this object to out . |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileStatus()
public FileStatus(long length, boolean isdir, int block_replication, long blocksize, long modification_time, Path path)
public FileStatus(long length, boolean isdir, int block_replication, long blocksize, long modification_time, long access_time, FsPermission permission, String owner, String group, Path path)
Method Detail |
---|
public long getLen()
public boolean isDir()
public long getBlockSize()
public short getReplication()
public long getModificationTime()
public long getAccessTime()
public FsPermission getPermission()
public String getOwner()
public String getGroup()
public Path getPath()
protected void setPermission(FsPermission permission)
permission
- if permission is null, default value is setprotected void setOwner(String owner)
owner
- if it is null, default value is setprotected void setGroup(String group)
group
- if it is null, default value is setpublic void write(DataOutput out) throws IOException
Writable
out
.
write
in interface 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
in interface Writable
in
- DataInput
to deseriablize this object from.
IOException
public int compareTo(Object o)
compareTo
in interface Comparable
o
- the object to be compared.
ClassCastException
- if the specified object's is not of
type FileStatuspublic boolean equals(Object o)
equals
in class Object
o
- the object to be compared.
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |