org.apache.hadoop.hdfs.server.namenode
Class INodeFileUnderConstruction

java.lang.Object
  extended by org.apache.hadoop.hdfs.server.namenode.INode
      extended by org.apache.hadoop.hdfs.server.namenode.INodeFile
          extended by org.apache.hadoop.hdfs.server.namenode.INodeFileUnderConstruction
All Implemented Interfaces:
Comparable<byte[]>, org.apache.hadoop.hdfs.server.namenode.FSInodeInfo

public class INodeFileUnderConstruction
extends INodeFile

I-node for file being written.


Field Summary
 
Fields inherited from class org.apache.hadoop.hdfs.server.namenode.INodeFile
blocks, header
 
Fields inherited from class org.apache.hadoop.hdfs.server.namenode.INode
accessTime, modificationTime, name, parent
 
Method Summary
 boolean isUnderConstruction()
          Is this inode being constructed?
 BlockInfoUnderConstruction setLastBlock(BlockInfo lastBlock, org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor[] targets)
          Convert the last block of the file to an under-construction block.
 
Methods inherited from class org.apache.hadoop.hdfs.server.namenode.INodeFile
getBlocks, getLastBlock, getPreferredBlockSize, getReplication, isDirectory, numBlocks, setBlock, setPermission, setPreferredBlockSize, setReplication
 
Methods inherited from class org.apache.hadoop.hdfs.server.namenode.INode
compareTo, computeContentSummary, equals, getAccessTime, getFsPermission, getFsPermissionShort, getFullPathName, getGroupName, getModificationTime, getPermissionStatus, getUserName, hashCode, isLink, setGroup, setPermissionStatus, setUser, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

isUnderConstruction

public boolean isUnderConstruction()
Is this inode being constructed?

Overrides:
isUnderConstruction in class INode

setLastBlock

public BlockInfoUnderConstruction setLastBlock(BlockInfo lastBlock,
                                               org.apache.hadoop.hdfs.server.blockmanagement.DatanodeDescriptor[] targets)
                                        throws IOException
Convert the last block of the file to an under-construction block. Set its locations.

Throws:
IOException


Copyright © 2012 Apache Software Foundation. All Rights Reserved.