org.apache.hadoop.hdfs.protocol
Class HdfsLocatedFileStatus

java.lang.Object
  extended by org.apache.hadoop.hdfs.protocol.HdfsFileStatus
      extended by org.apache.hadoop.hdfs.protocol.HdfsLocatedFileStatus
All Implemented Interfaces:
org.apache.hadoop.io.Writable

@InterfaceAudience.Private
@InterfaceStability.Evolving
public class HdfsLocatedFileStatus
extends HdfsFileStatus

Interface that represents the over the wire information including block locations for a file.


Field Summary
 
Fields inherited from class org.apache.hadoop.hdfs.protocol.HdfsFileStatus
EMPTY_NAME
 
Constructor Summary
HdfsLocatedFileStatus()
          Default constructor
HdfsLocatedFileStatus(long length, boolean isdir, int block_replication, long blocksize, long modification_time, long access_time, org.apache.hadoop.fs.permission.FsPermission permission, String owner, String group, byte[] symlink, byte[] path, LocatedBlocks locations)
          Constructor
 
Method Summary
 LocatedBlocks getBlockLocations()
           
 void readFields(DataInput in)
           
 void write(DataOutput out)
           
 
Methods inherited from class org.apache.hadoop.hdfs.protocol.HdfsFileStatus
getAccessTime, getBlockSize, getFullName, getFullPath, getGroup, getLen, getLocalName, getLocalNameInBytes, getModificationTime, getOwner, getPermission, getReplication, getSymlink, isDir, isEmptyLocalName, isSymlink
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HdfsLocatedFileStatus

public HdfsLocatedFileStatus()
Default constructor


HdfsLocatedFileStatus

public HdfsLocatedFileStatus(long length,
                             boolean isdir,
                             int block_replication,
                             long blocksize,
                             long modification_time,
                             long access_time,
                             org.apache.hadoop.fs.permission.FsPermission permission,
                             String owner,
                             String group,
                             byte[] symlink,
                             byte[] path,
                             LocatedBlocks locations)
Constructor

Parameters:
length - size
isdir - if this is directory
block_replication - the file's replication factor
blocksize - the file's block size
modification_time - most recent modification time
access_time - most recent access time
permission - permission
owner - owner
group - group
symlink - symbolic link
path - local path name in java UTF8 format
locations - block locations
Method Detail

getBlockLocations

public LocatedBlocks getBlockLocations()

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Overrides:
write in class HdfsFileStatus
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Overrides:
readFields in class HdfsFileStatus
Throws:
IOException


Copyright © 2009 The Apache Software Foundation