Class Snapshot.Root
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.INode
org.apache.hadoop.hdfs.server.namenode.INodeWithAdditionalFields
org.apache.hadoop.hdfs.server.namenode.INodeDirectory
org.apache.hadoop.hdfs.server.namenode.snapshot.Snapshot.Root
- All Implemented Interfaces:
Comparable<byte[]>,INodeAttributes,INodeDirectoryAttributes,Diff.Element<byte[]>,org.apache.hadoop.util.LightWeightGSet.LinkedElement
- Enclosing class:
- Snapshot
The root directory of the snapshot.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hdfs.server.namenode.INodeDirectory
INodeDirectory.SnapshotAndINodeNested 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.SnapshotCopyNested classes/interfaces inherited from interface org.apache.hadoop.hdfs.server.namenode.INodeDirectoryAttributes
INodeDirectoryAttributes.CopyWithQuota, INodeDirectoryAttributes.SnapshotCopy -
Field Summary
Fields inherited from class org.apache.hadoop.hdfs.server.namenode.INodeDirectory
DEFAULT_FILES_PER_DIRECTORYFields inherited from class org.apache.hadoop.hdfs.server.namenode.INodeWithAdditionalFields
features -
Method Summary
Modifier and TypeMethodDescriptioncomputeContentSummary(int snapshotId, ContentSummaryComputationContext summary) Count subtree content summary with aContentCounts.getChild(byte[] name, int snapshotId) getChildrenList(int snapshotId) Get the full path name of the root directory of this snapshot.booleanCompare the metadata with another INodeDirectoryMethods inherited from class org.apache.hadoop.hdfs.server.namenode.INodeDirectory
accept, addChild, addChild, addChildAtLoading, addSnapshot, addSnapshotFeature, addSnapshottableFeature, addSpaceConsumed, asDirectory, cleanSubtree, cleanSubtreeRecursively, clear, clearChildren, computeDirectoryContentSummary, computeQuotaUsage, computeQuotaUsage4CurrentDirectory, destroyAndCollectBlocks, dumpTreeRecursively, dumpTreeRecursively, getChildrenNum, getDiffs, getDirectorySnapshottableFeature, getDirectoryWithQuotaFeature, getDirectoryWithSnapshotFeature, getLocalStoragePolicyID, getQuotaCounts, getSnapshot, getSnapshotINode, getStoragePolicyID, isDescendantOfSnapshotRoot, isDirectory, isSnapshottable, isWithSnapshot, recordModification, removeChild, removeChild, removeSnapshot, removeSnapshottableFeature, renameSnapshot, replaceChild, saveChild2Snapshot, searchChild, setSnapshotQuota, toDetailString, undoRename4DstParent, undoRename4ScrParent, valueOfMethods inherited from class org.apache.hadoop.hdfs.server.namenode.INodeWithAdditionalFields
addAclFeature, addFeature, addXAttrFeature, getAclFeature, getFeature, getFeatures, getFsPermissionShort, getId, getLocalNameBytes, getNext, getPermissionLong, getPermissionStatus, removeAclFeature, removeFeature, removeXAttrFeature, setAccessTime, setLocalName, setModificationTime, setNext, updateModificationTimeMethods inherited from class org.apache.hadoop.hdfs.server.namenode.INode
asFile, asReference, asSymlink, compareTo, computeAndConvertContentSummary, computeContentSummary, computeQuotaUsage, computeQuotaUsage, dumpINode, dumpParentINodes, dumpTreeRecursively, dumpTreeRecursively, equals, getAccessTime, getAclFeature, getFsPermission, getFullPathAndObjectString, getGroupName, getKey, getLocalName, getModificationTime, getObjectString, getParent, getParentReference, getParentString, getPathComponents, getPathComponents, getPathNames, getStoragePolicyIDForQuota, getUserName, getXAttrFeature, hashCode, isAncestorDirectory, isDeleted, isFile, isInCurrentState, isInLatestSnapshot, isLastReference, isQuotaSet, isReference, isSetStoragePolicy, isSymlink, setAccessTime, setModificationTime, setParent, setParentReference, shouldRecordInSrcSnapshot, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hadoop.hdfs.server.namenode.INodeAttributes
getAccessTime, getAclFeature, getFsPermission, getFsPermissionShort, getGroupName, getLocalNameBytes, getModificationTime, getPermissionLong, getUserName, getXAttrFeature
-
Method Details
-
getChildrenList
- Overrides:
getChildrenListin classINodeDirectory- Parameters:
snapshotId- if it is notSnapshot.CURRENT_STATE_ID, get the result from the corresponding snapshot; otherwise, get the result from the current directory.- Returns:
- the current children list if the specified snapshot is null; otherwise, return the children list corresponding to the snapshot. Note that the returned list is never null.
-
getChild
- Overrides:
getChildin classINodeDirectory- Parameters:
name- the name of the childsnapshotId- if it is notSnapshot.CURRENT_STATE_ID, get the result from the corresponding snapshot; otherwise, get the result from the current directory.- Returns:
- the child inode.
-
computeContentSummary
public ContentSummaryComputationContext computeContentSummary(int snapshotId, ContentSummaryComputationContext summary) throws org.apache.hadoop.security.AccessControlException Description copied from class:INodeCount subtree content summary with aContentCounts.- Overrides:
computeContentSummaryin classINodeDirectory- Parameters:
snapshotId- Specify the time range for the calculation. If this parameter equals toSnapshot.CURRENT_STATE_ID, the result covers both the current states and all the snapshots. Otherwise the result only covers all the files/directories contained in the specific snapshot.summary- the context object holding counts for the subtree.- Returns:
- The same objects as summary.
- Throws:
org.apache.hadoop.security.AccessControlException
-
metadataEquals
Description copied from class:INodeDirectoryCompare the metadata with another INodeDirectory- Specified by:
metadataEqualsin interfaceINodeDirectoryAttributes- Overrides:
metadataEqualsin classINodeDirectory
-
getFullPathName
- Overrides:
getFullPathNamein classINode
-
getRootFullPathName
Get the full path name of the root directory of this snapshot.- Returns:
- full path to the root directory of the snapshot
-