Class INodeWithAdditionalFields
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.INode
org.apache.hadoop.hdfs.server.namenode.INodeWithAdditionalFields
- All Implemented Interfaces:
Comparable<byte[]>,INodeAttributes,Diff.Element<byte[]>,org.apache.hadoop.util.LightWeightGSet.LinkedElement
- Direct Known Subclasses:
INodeDirectory,INodeFile,INodeSymlink
@Private
public abstract class INodeWithAdditionalFields
extends INode
implements org.apache.hadoop.util.LightWeightGSet.LinkedElement
INode with additional fields including id, name, permission,
access time and modification time.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hdfs.server.namenode.INode
INode.BlocksMapUpdateInfo, INode.Feature, INode.QuotaDelta, INode.ReclaimContextNested classes/interfaces inherited from interface org.apache.hadoop.hdfs.server.namenode.INodeAttributes
INodeAttributes.SnapshotCopy -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected voidvoidfinal AclFeaturegetAclFeature(int snapshotId) protected <T extends INode.Feature>
TgetFeature(Class<? extends INode.Feature> clazz) final INode.Feature[]final shortfinal longgetId()Get inode idfinal byte[]org.apache.hadoop.util.LightWeightGSet.LinkedElementgetNext()longfinal org.apache.hadoop.fs.permission.PermissionStatusgetPermissionStatus(int snapshotId) Get thePermissionStatusvoidprotected voidvoidfinal voidsetAccessTime(long accessTime) Set last access time of inode.final voidsetLocalName(byte[] name) Set local file namefinal voidsetModificationTime(long modificationTime) Set the last modification time of inode.voidsetNext(org.apache.hadoop.util.LightWeightGSet.LinkedElement next) final INodeupdateModificationTime(long mtime, int latestSnapshotId) Update modification time if it is larger than the current value.Methods inherited from class org.apache.hadoop.hdfs.server.namenode.INode
accept, addSpaceConsumed, asDirectory, asFile, asReference, asSymlink, cleanSubtree, clear, compareTo, computeAndConvertContentSummary, computeContentSummary, computeContentSummary, computeQuotaUsage, computeQuotaUsage, computeQuotaUsage, destroyAndCollectBlocks, dumpINode, dumpParentINodes, dumpTreeRecursively, dumpTreeRecursively, dumpTreeRecursively, equals, getAccessTime, getAclFeature, getFsPermission, getFullPathAndObjectString, getFullPathName, getGroupName, getKey, getLocalName, getLocalStoragePolicyID, getModificationTime, getObjectString, getParent, getParentReference, getParentString, getPathComponents, getPathComponents, getPathNames, getQuotaCounts, getSnapshotINode, getStoragePolicyID, getStoragePolicyIDForQuota, getUserName, getXAttrFeature, hashCode, isAncestorDirectory, isDeleted, isDirectory, isFile, isInCurrentState, isInLatestSnapshot, isLastReference, isQuotaSet, isReference, isSetStoragePolicy, isSymlink, setAccessTime, setModificationTime, setParent, setParentReference, shouldRecordInSrcSnapshot, toDetailString, toString
-
Field Details
-
features
-
-
Method Details
-
setNext
public void setNext(org.apache.hadoop.util.LightWeightGSet.LinkedElement next) - Specified by:
setNextin interfaceorg.apache.hadoop.util.LightWeightGSet.LinkedElement
-
getNext
public org.apache.hadoop.util.LightWeightGSet.LinkedElement getNext()- Specified by:
getNextin interfaceorg.apache.hadoop.util.LightWeightGSet.LinkedElement
-
getId
public final long getId()Get inode id -
getLocalNameBytes
public final byte[] getLocalNameBytes()- Specified by:
getLocalNameBytesin interfaceINodeAttributes- Returns:
- null if the local name is null; otherwise, return the local name byte array.
-
setLocalName
public final void setLocalName(byte[] name) Description copied from class:INodeSet local file name- Specified by:
setLocalNamein classINode
-
getPermissionStatus
public final org.apache.hadoop.fs.permission.PermissionStatus getPermissionStatus(int snapshotId) Description copied from class:INodeGet thePermissionStatus- Specified by:
getPermissionStatusin classINode
-
getFsPermissionShort
public final short getFsPermissionShort()- Specified by:
getFsPermissionShortin interfaceINodeAttributes- Returns:
- the permission as a short.
-
getPermissionLong
public long getPermissionLong()- Specified by:
getPermissionLongin interfaceINodeAttributes- Returns:
- the permission information as a long.
-
getAclFeature
-
updateModificationTime
Update modification time if it is larger than the current value.- Specified by:
updateModificationTimein classINode
-
setModificationTime
public final void setModificationTime(long modificationTime) Description copied from class:INodeSet the last modification time of inode.- Specified by:
setModificationTimein classINode
-
setAccessTime
public final void setAccessTime(long accessTime) Set last access time of inode.- Specified by:
setAccessTimein classINode
-
addFeature
-
removeFeature
-
getFeature
-
removeAclFeature
public void removeAclFeature() -
addAclFeature
-
removeXAttrFeature
public void removeXAttrFeature() -
addXAttrFeature
-
getFeatures
-