Class INodeReference.WithCount
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.INode
org.apache.hadoop.hdfs.server.namenode.INodeReference
org.apache.hadoop.hdfs.server.namenode.INodeReference.WithCount
- All Implemented Interfaces:
Comparable<byte[]>,INodeAttributes,Diff.Element<byte[]>
- Enclosing class:
- INodeReference
An anonymous reference with reference count.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hdfs.server.namenode.INodeReference
INodeReference.DstReference, INodeReference.WithCount, INodeReference.WithNameNested 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
FieldsModifier and TypeFieldDescriptionstatic final Comparator<INodeReference.WithName>Compare snapshot with IDs, where null indicates the current status thus is greater than any non-null snapshot. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidIncrement and then return the reference count.Return the last WithName reference if there is any, null otherwise.getParentRef(int snapshotId) intvoidDecrement and then return the reference count.Methods inherited from class org.apache.hadoop.hdfs.server.namenode.INodeReference
accept, asDirectory, asFile, asReference, asSymlink, cleanSubtree, clear, computeContentSummary, computeQuotaUsage, destroyAndCollectBlocks, dumpTreeRecursively, getAccessTime, getDstSnapshotId, getFsPermission, getFsPermissionShort, getGroupName, getId, getLocalNameBytes, getLocalStoragePolicyID, getModificationTime, getPermissionLong, getPermissionStatus, getQuotaCounts, getReferredINode, getSnapshotINode, getStoragePolicyID, getUserName, isDirectory, isFile, isReference, isSymlink, setAccessTime, setLocalName, setModificationTime, tryRemoveReference, updateModificationTimeMethods inherited from class org.apache.hadoop.hdfs.server.namenode.INode
addSpaceConsumed, compareTo, computeAndConvertContentSummary, computeContentSummary, computeQuotaUsage, computeQuotaUsage, dumpINode, dumpParentINodes, dumpTreeRecursively, dumpTreeRecursively, equals, getAccessTime, getAclFeature, getFsPermission, getFullPathAndObjectString, getFullPathName, getGroupName, getKey, getLocalName, getModificationTime, getObjectString, getParent, getParentReference, getParentString, getPathComponents, getPathComponents, getPathNames, getStoragePolicyIDForQuota, getUserName, getXAttrFeature, hashCode, isAncestorDirectory, isDeleted, isInCurrentState, isInLatestSnapshot, isLastReference, isQuotaSet, isSetStoragePolicy, setAccessTime, setModificationTime, setParent, setParentReference, shouldRecordInSrcSnapshot, toString
-
Field Details
-
WITHNAME_COMPARATOR
Compare snapshot with IDs, where null indicates the current status thus is greater than any non-null snapshot.
-
-
Constructor Details
-
WithCount
-
-
Method Details
-
getCountDetails
-
toDetailString
- Overrides:
toDetailStringin classINodeReference
-
getReferenceCount
public int getReferenceCount() -
addReference
Increment and then return the reference count. -
removeReference
Decrement and then return the reference count. -
getLastWithName
Return the last WithName reference if there is any, null otherwise. -
getParentRef
- Returns:
- the WithName/DstReference node contained in the given snapshot.
-