| Package | Description |
|---|---|
| org.apache.hadoop.hdfs.server.namenode | |
| org.apache.hadoop.hdfs.server.namenode.snapshot | |
| org.apache.hadoop.hdfs.server.namenode.visitor |
Use the visitor pattern to visit namespace tree.
|
| Modifier and Type | Class | Description |
|---|---|---|
class |
INodeDirectory |
Directory INode class.
|
class |
INodeFile |
I-node for closed file.
|
class |
INodeReference |
A reference to an inode.
|
static class |
INodeReference.DstReference |
|
static class |
INodeReference.WithCount |
An anonymous reference with reference count.
|
static class |
INodeReference.WithName |
A reference with a fixed name.
|
class |
INodeSymlink |
An
INode representing a symbolic link. |
class |
INodeWithAdditionalFields |
INode with additional fields including id, name, permission,
access time and modification time. |
| Modifier and Type | Field | Description |
|---|---|---|
INode |
INodeDirectory.SnapshotAndINode.inode |
| Modifier and Type | Field | Description |
|---|---|---|
protected java.util.List<INode> |
INode.ReclaimContext.removedINodes |
| Modifier and Type | Method | Description |
|---|---|---|
INode |
INodeMap.get(long id) |
Get the
INode with the given id from the map. |
INode |
INodeDirectory.getChild(byte[] name,
int snapshotId) |
|
INode |
FSDirectory.getInode(long id) |
Get the inode from inodeMap based on its inode id.
|
INode |
FSDirectory.getINode(java.lang.String src) |
Get
INode associated with the file / directory. |
INode |
FSDirectory.getINode(java.lang.String src,
FSDirectory.DirOp dirOp) |
Get
INode associated with the file / directory. |
INode |
INodesInPath.getINode(int i) |
|
INode |
FSDirectory.getINode4Write(java.lang.String src) |
Get
INode associated with the file / directory. |
INode[] |
INodeAttributeProvider.AuthorizationContext.getInodes() |
|
INode[] |
INodesInPath.getINodesArray() |
|
INode |
INodesInPath.getLastINode() |
|
INode |
INodeReference.getReferredINode() |
|
INode |
FSImageFormat.Loader.loadINodeWithLocalName(boolean isSnapshotINode,
java.io.DataInput in,
boolean updateINodeMap) |
|
INode |
FSImageFormat.Loader.loadINodeWithLocalName(boolean isSnapshotINode,
java.io.DataInput in,
boolean updateINodeMap,
StartupProgress.Counter counter) |
|
INode |
INodeDirectory.saveChild2Snapshot(INode child,
int latestSnapshotId,
INode snapshotCopy) |
Save the child to the latest snapshot.
|
INode |
INode.setAccessTime(long accessTime,
int latestSnapshotId,
boolean skipCaptureAccessTimeOnlyChangeInSnapshot) |
Set last access time of inode.
|
INode |
INode.setModificationTime(long modificationTime,
int latestSnapshotId) |
Set the last modification time of inode.
|
protected INode |
FSTreeTraverser.traverseDirInt(long startId,
INode curr,
java.util.List<byte[]> startAfters,
FSTreeTraverser.TraverseInfo traverseInfo) |
Iterates the parent directory, and add direct children files to current
batch.
|
static INode |
FSDirXAttrOp.unprotectedSetXAttrs(FSDirectory fsd,
INodesInPath iip,
java.util.List<org.apache.hadoop.fs.XAttr> xAttrs,
java.util.EnumSet<org.apache.hadoop.fs.XAttrSetFlag> flag) |
|
abstract INode |
INode.updateModificationTime(long mtime,
int latestSnapshotId) |
Update modification time if it is larger than the current value.
|
INode |
INodeReference.updateModificationTime(long mtime,
int latestSnapshotId) |
|
INode |
INodeWithAdditionalFields.updateModificationTime(long mtime,
int latestSnapshotId) |
Update modification time if it is larger than the current value.
|
| Modifier and Type | Method | Description |
|---|---|---|
ReadOnlyList<INode> |
INodeDirectory.getChildrenList(int snapshotId) |
|
java.util.Map<INode,QuotaCounts> |
INode.QuotaDelta.getUpdateMap() |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
INodeDirectory.addChild(INode node) |
|
boolean |
INodeDirectory.addChild(INode node,
boolean setModTime,
int latestSnapshotId) |
Add a child inode to the directory.
|
boolean |
INodeDirectory.addChildAtLoading(INode node) |
During image loading, the search is unnecessary since the insert position
should always be at the end of the map given the sequence they are
serialized on disk.
|
INodesInPath |
FSDirectory.addLastINode(INodesInPath existing,
INode inode,
org.apache.hadoop.fs.permission.FsPermission modes,
boolean checkQuota) |
Add a child to the end of the path specified by INodesInPath.
|
void |
FSDirectory.addToInodeMap(INode inode) |
This method is always called with writeLock of FSDirectory held.
|
static INodesInPath |
INodesInPath.append(INodesInPath iip,
INode child,
byte[] childName) |
Extend a given INodesInPath with a child INode.
|
protected abstract boolean |
FSTreeTraverser.canTraverseDir(INode inode) |
Check whether dir is traversable or not.
|
void |
FSPermissionChecker.checkPermission(java.lang.String fsOwner,
java.lang.String supergroup,
org.apache.hadoop.security.UserGroupInformation callerUgi,
INodeAttributes[] inodeAttrs,
INode[] inodes,
byte[][] components,
int snapshotId,
java.lang.String path,
int ancestorIndex,
boolean doCheckOwner,
org.apache.hadoop.fs.permission.FsAction ancestorAccess,
org.apache.hadoop.fs.permission.FsAction parentAccess,
org.apache.hadoop.fs.permission.FsAction access,
org.apache.hadoop.fs.permission.FsAction subAccess,
boolean ignoreEmptyDir) |
|
void |
INodeAttributeProvider.AccessControlEnforcer.checkPermission(java.lang.String fsOwner,
java.lang.String supergroup,
org.apache.hadoop.security.UserGroupInformation callerUgi,
INodeAttributes[] inodeAttrs,
INode[] inodes,
byte[][] pathByNameArr,
int snapshotId,
java.lang.String path,
int ancestorIndex,
boolean doCheckOwner,
org.apache.hadoop.fs.permission.FsAction ancestorAccess,
org.apache.hadoop.fs.permission.FsAction parentAccess,
org.apache.hadoop.fs.permission.FsAction access,
org.apache.hadoop.fs.permission.FsAction subAccess,
boolean ignoreEmptyDir) |
Deprecated.
|
static boolean |
AclStorage.copyINodeDefaultAcl(INode child) |
If a default ACL is defined on a parent directory, then copies that default
ACL to a newly created child file or directory.
|
java.lang.String |
ContentSummaryComputationContext.getErasureCodingPolicyName(INode inode) |
Get the erasure coding policy.
|
static byte[][] |
FSDirectory.getPathComponents(INode inode) |
Given an INode get all the path complents leading to it from the root.
|
int |
INode.ReclaimContext.getSnapshotIdToBeDeleted(int snapshotId,
INode inode) |
|
INodeAttributeProvider.AuthorizationContext.Builder |
INodeAttributeProvider.AuthorizationContext.Builder.inodes(INode[] val) |
|
static boolean |
FSDirectory.isReservedName(INode inode) |
Check if a given inode name is reserved
|
void |
FSEditLog.logMkDir(java.lang.String path,
INode newNode) |
Add create directory record to edit log
|
protected abstract boolean |
FSTreeTraverser.processFileInode(INode inode,
FSTreeTraverser.TraverseInfo traverseInfo) |
Process an Inode.
|
void |
INodeMap.put(INode inode) |
|
static java.util.List<org.apache.hadoop.fs.permission.AclEntry> |
AclStorage.readINodeAcl(INode inode,
int snapshotId) |
Reads the existing extended ACL entries of an inode.
|
static java.util.List<org.apache.hadoop.fs.permission.AclEntry> |
AclStorage.readINodeLogicalAcl(INode inode) |
Reads the existing ACL of an inode.
|
static org.apache.hadoop.fs.XAttr |
XAttrStorage.readINodeXAttrByPrefixedName(INode inode,
int snapshotId,
java.lang.String prefixedName) |
Reads the extended attribute of an inode by name with prefix.
|
void |
INodeMap.remove(INode inode) |
Remove a
INode from the map. |
boolean |
INodeDirectory.removeChild(INode child) |
Remove the specified child from this directory.
|
boolean |
INodeDirectory.removeChild(INode child,
int latestSnapshotId) |
Remove the specified child from this directory.
|
static INodesInPath |
INodesInPath.replace(INodesInPath iip,
int pos,
INode inode) |
Replace an inode of the given INodesInPath in the given position.
|
void |
INodeDirectory.replaceChild(INode oldChild,
INode newChild,
INodeMap inodeMap) |
Replace the given child with a new child.
|
INode |
INodeDirectory.saveChild2Snapshot(INode child,
int latestSnapshotId,
INode snapshotCopy) |
Save the child to the latest snapshot.
|
static void |
FSImageSerialization.saveINode2Image(INode node,
java.io.DataOutput out,
boolean writeUnderConstruction,
SnapshotFSImageFormat.ReferenceMap referenceMap) |
Save one inode's attributes to the image.
|
int |
INodeDirectory.searchChild(INode inode) |
Search for the given INode in the children list and the deleted lists of
snapshots.
|
void |
INodeAttributeProvider.AuthorizationContext.setInodes(INode[] inodes) |
|
protected INode |
FSTreeTraverser.traverseDirInt(long startId,
INode curr,
java.util.List<byte[]> startAfters,
FSTreeTraverser.TraverseInfo traverseInfo) |
Iterates the parent directory, and add direct children files to current
batch.
|
static int |
INodeReference.tryRemoveReference(INode inode) |
Try to remove the given reference and then return the reference count.
|
void |
INodeDirectory.undoRename4DstParent(BlockStoragePolicySuite bsps,
INode deletedChild,
int latestSnapshotId) |
Undo the rename operation for the dst tree, i.e., if the rename operation
(with OVERWRITE option) removes a file/dir from the dst tree, add it back
and delete possible record in the deleted list.
|
void |
INodeDirectory.undoRename4ScrParent(INodeReference oldChild,
INode newChild) |
This method is usually called by the undo section of rename.
|
static void |
AclStorage.updateINodeAcl(INode inode,
java.util.List<org.apache.hadoop.fs.permission.AclEntry> newAcl,
int snapshotId) |
Updates an inode with a new ACL.
|
static void |
XAttrStorage.updateINodeXAttrs(INode inode,
java.util.List<org.apache.hadoop.fs.XAttr> xAttrs,
int snapshotId) |
Update xattrs of inode.
|
static INodeDirectory |
INodeDirectory.valueOf(INode inode,
java.lang.Object path) |
Cast INode to INodeDirectory.
|
static INodeFile |
INodeFile.valueOf(INode inode,
java.lang.String path) |
The same as valueOf(inode, path, false).
|
static INodeFile |
INodeFile.valueOf(INode inode,
java.lang.String path,
boolean acceptNull) |
Cast INode to INodeFile.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
INodeDirectory.cleanSubtreeRecursively(INode.ReclaimContext reclaimContext,
int snapshot,
int prior,
java.util.Map<INode,INode> excludedNodes) |
Call cleanSubtree(..) recursively down the subtree.
|
void |
INodeDirectory.cleanSubtreeRecursively(INode.ReclaimContext reclaimContext,
int snapshot,
int prior,
java.util.Map<INode,INode> excludedNodes) |
Call cleanSubtree(..) recursively down the subtree.
|
void |
FSDirectory.removeFromInodeMap(java.util.List<? extends INode> inodes) |
This method is always called with writeLock of FSDirectory held.
|
| Constructor | Description |
|---|---|
INodeReference(INode parent,
INode referred) |
|
SnapshotAndINode(int snapshot,
INode inode) |
|
WithCount(INodeReference parent,
INode referred) |
| Constructor | Description |
|---|---|
ReclaimContext(BlockStoragePolicySuite bsps,
INode.BlocksMapUpdateInfo collectedBlocks,
java.util.List<INode> removedINodes,
java.util.List<java.lang.Long> removedUCFiles) |
| Modifier and Type | Class | Description |
|---|---|---|
static class |
Snapshot.Root |
The root directory of the snapshot.
|
| Modifier and Type | Method | Description |
|---|---|---|
INode |
DirectoryWithSnapshotFeature.getChild(INodeDirectory currentINode,
byte[] name,
int snapshotId) |
|
INode |
Snapshot.Root.getChild(byte[] name,
int snapshotId) |
|
static INode |
SnapshotFSImageFormat.loadCreated(byte[] createdNodeName,
INodeDirectory parent) |
Load a node stored in the created list from fsimage.
|
INode |
DirectoryWithSnapshotFeature.saveChild2Snapshot(INodeDirectory currentINode,
INode child,
int latestSnapshotId,
INode snapshotCopy) |
Used to record the modification of a symlink node
|
| Modifier and Type | Method | Description |
|---|---|---|
ReadOnlyList<INode> |
DirectoryWithSnapshotFeature.getChildrenList(INodeDirectory currentINode,
int snapshotId) |
|
ReadOnlyList<INode> |
Snapshot.Root.getChildrenList(int snapshotId) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
DirectoryWithSnapshotFeature.addChild(INodeDirectory parent,
INode inode,
boolean setModTime,
int latestSnapshotId) |
Add an inode into parent's children list.
|
static void |
DirectoryWithSnapshotFeature.destroyDstSubtree(INode.ReclaimContext reclaimContext,
INode inode,
int snapshot,
int prior) |
Destroy a subtree under a DstReference node.
|
static int |
Snapshot.findLatestSnapshot(INode inode,
int anchor) |
Find the latest snapshot that 1) covers the given inode (which means the
snapshot was either taken on the inode or taken on an ancestor of the
inode), and 2) was taken before the given snapshot (if the given snapshot
is not null).
|
int |
DirectoryWithSnapshotFeature.DirectoryDiffList.findSnapshotDeleted(INode child) |
Find the corresponding snapshot whose deleted list contains the given
inode.
|
boolean |
DirectoryWithSnapshotFeature.removeChild(INodeDirectory parent,
INode child,
int latestSnapshotId) |
Remove an inode from parent's children list.
|
boolean |
DirectoryWithSnapshotFeature.DirectoryDiffList.removeDeletedChild(INode child) |
Remove the given child from the deleted list, if there is any.
|
boolean |
DirectoryWithSnapshotFeature.DirectoryDiffList.replaceCreatedChild(INode oldChild,
INode newChild) |
Replace the given child in the created/deleted list, if there is any.
|
INode |
DirectoryWithSnapshotFeature.saveChild2Snapshot(INodeDirectory currentINode,
INode child,
int latestSnapshotId,
INode snapshotCopy) |
Used to record the modification of a symlink node
|
| Modifier and Type | Method | Description |
|---|---|---|
static INodeCountVisitor.Counts |
INodeCountVisitor.countTree(INode root) |
|
int |
INodeCountVisitor.Counts.getCount(INode inode) |
|
void |
NamespacePrintVisitor.postVisitReferred(INode referred) |
|
default void |
NamespaceVisitor.postVisitReferred(INode referred) |
Right after visiting the given referred
INode. |
void |
NamespacePrintVisitor.preVisitReferred(INode referred) |
|
default void |
NamespaceVisitor.preVisitReferred(INode referred) |
Right before visiting the given referred
INode. |
static java.lang.String |
NamespacePrintVisitor.print2Sting(INode root) |
|
default void |
NamespaceVisitor.INodeVisitor.visit(INode iNode,
int snapshot) |
Visiting the given
INode. |
Copyright © 2008–2025 Apache Software Foundation. All rights reserved.