@InterfaceAudience.Private public class INodeFileUnderConstruction extends INodeFile implements MutableBlockCollection
INode.BlocksMapUpdateInfo
INodeFileAttributes.SnapshotCopy
Constructor and Description |
---|
INodeFileUnderConstruction(INodeFile that,
String clientName,
String clientMachine,
DatanodeDescriptor clientNode) |
Modifier and Type | Method and Description |
---|---|
protected void |
assertAllBlocksComplete()
Assert all blocks are complete.
|
String |
getClientMachine() |
String |
getClientName() |
DatanodeDescriptor |
getClientNode() |
boolean |
isUnderConstruction()
Is this file under construction?
|
INodeFileUnderConstruction |
recordModification(Snapshot latest,
INodeMap inodeMap)
This inode is being modified.
|
BlockInfoUnderConstruction |
setLastBlock(BlockInfo lastBlock,
DatanodeDescriptor[] targets)
Convert the last block of the file to an under-construction block.
|
protected INodeFile |
toINodeFile(long mtime)
Converts an INodeFileUnderConstruction to an INodeFile.
|
static INodeFileUnderConstruction |
valueOf(INode inode,
String path)
Cast INode to INodeFileUnderConstruction.
|
asFile, cleanSubtree, computeContentSummary, computeFileSize, computeFileSize, computeFileSize, computeFileSizeNotIncludingLastUcBlock, computeQuotaUsage, destroyAndCollectBlocks, diskspaceConsumed, diskspaceConsumed, dumpTreeRecursively, getBlockReplication, getBlocks, getFileReplication, getFileReplication, getHeaderLong, getLastBlock, getName, getPreferredBlockSize, getSnapshotINode, isFile, numBlocks, setBlock, setBlocks, setFileReplication, setFileReplication, toUnderConstruction, valueOf
getFsPermissionShort, getId, getLocalNameBytes, getNext, getPermissionLong, setAccessTime, setLocalName, setModificationTime, setNext, updateModificationTime
addSpaceConsumed, asDirectory, asReference, asSymlink, clear, compareTo, computeContentSummary, computeQuotaUsage, computeQuotaUsage, dumpTreeRecursively, dumpTreeRecursively, equals, getAccessTime, getDsQuota, getFsPermission, getFullPathName, getGroupName, getKey, getLocalName, getModificationTime, getNsQuota, getObjectString, getParent, getParentReference, getParentString, getUserName, hashCode, isAncestorDirectory, isDirectory, isInLatestSnapshot, isQuotaSet, isReference, isSymlink, setAccessTime, setModificationTime, setParent, setParentReference, shouldRecordInSrcSnapshot, toDetailString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
setBlock
computeContentSummary, getBlockReplication, getBlocks, getLastBlock, getName, getPreferredBlockSize, numBlocks
getAccessTime, getFsPermission, getFsPermissionShort, getGroupName, getLocalNameBytes, getModificationTime, getPermissionLong, getUserName
public INodeFileUnderConstruction(INodeFile that, String clientName, String clientMachine, DatanodeDescriptor clientNode)
public static INodeFileUnderConstruction valueOf(INode inode, String path) throws FileNotFoundException
FileNotFoundException
public String getClientName()
public String getClientMachine()
public DatanodeDescriptor getClientNode()
public final boolean isUnderConstruction()
INodeFile
isUnderConstruction
in class INodeFile
protected INodeFile toINodeFile(long mtime)
public INodeFileUnderConstruction recordModification(Snapshot latest, INodeMap inodeMap) throws QuotaExceededException
INode
recordModification
in class INodeFile
latest
- the latest snapshot that has been taken.
Note that it is null if no snapshots have been taken.inodeMap
- while recording modification, the inode or its parent may
get replaced, and the inodeMap needs to be updated.QuotaExceededException
protected void assertAllBlocksComplete()
public BlockInfoUnderConstruction setLastBlock(BlockInfo lastBlock, DatanodeDescriptor[] targets) throws IOException
setLastBlock
in interface MutableBlockCollection
IOException
Copyright © 2013 Apache Software Foundation. All rights reserved.