@InterfaceAudience.Private public class INodeFileUnderConstruction extends INodeFile implements MutableBlockCollection
INode.BlocksMapUpdateInfoINodeFileAttributes.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, valueOfgetFsPermissionShort, getId, getLocalNameBytes, getNext, getPermissionLong, setAccessTime, setLocalName, setModificationTime, setNext, updateModificationTimeaddSpaceConsumed, 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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitsetBlockcomputeContentSummary, getBlockReplication, getBlocks, getLastBlock, getName, getPreferredBlockSize, numBlocksgetAccessTime, getFsPermission, getFsPermissionShort, getGroupName, getLocalNameBytes, getModificationTime, getPermissionLong, getUserNamepublic INodeFileUnderConstruction(INodeFile that, String clientName, String clientMachine, DatanodeDescriptor clientNode)
public static INodeFileUnderConstruction valueOf(INode inode, String path) throws FileNotFoundException
FileNotFoundExceptionpublic String getClientName()
public String getClientMachine()
public DatanodeDescriptor getClientNode()
public final boolean isUnderConstruction()
INodeFileisUnderConstruction in class INodeFileprotected INodeFile toINodeFile(long mtime)
public INodeFileUnderConstruction recordModification(Snapshot latest, INodeMap inodeMap) throws QuotaExceededException
INoderecordModification in class INodeFilelatest - 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.QuotaExceededExceptionprotected void assertAllBlocksComplete()
public BlockInfoUnderConstruction setLastBlock(BlockInfo lastBlock, DatanodeDescriptor[] targets) throws IOException
setLastBlock in interface MutableBlockCollectionIOExceptionCopyright © 2013 Apache Software Foundation. All rights reserved.