public static class DirectoryWithSnapshotFeature.DirectoryDiffList extends Object
| Constructor and Description | 
|---|
| DirectoryDiffList() | 
| Modifier and Type | Method and Description | 
|---|---|
| DiffList<D> | asList() | 
| void | clear()Clear the list. | 
| void | deleteSnapshotDiff(INode.ReclaimContext reclaimContext,
                  int snapshot,
                  int prior,
                  N currentINode)Delete a snapshot. | 
| int | findSnapshotDeleted(org.apache.hadoop.hdfs.server.namenode.INode child)Find the corresponding snapshot whose deleted list contains the given
 inode. | 
| D | getDiffById(int snapshotId) | 
| int | getDiffIndexById(int snapshotId) | 
| D | getLast() | 
| int | getLastSnapshotId() | 
| int | getPrior(int snapshotId) | 
| int | getPrior(int anchorId,
        boolean exclusive)Find the latest snapshot before a given snapshot. | 
| int | getSnapshotById(int snapshotId)Search for the snapshot whose id is 1) no less than the given id, 
 and 2) most close to the given id. | 
| A | getSnapshotINode(int snapshotId,
                A currentINode) | 
| boolean | isEmpty() | 
| Iterator<D> | iterator() | 
| boolean | removeDeletedChild(org.apache.hadoop.hdfs.server.namenode.INode child)Remove the given child from the deleted list, if there is any. | 
| boolean | replaceCreatedChild(org.apache.hadoop.hdfs.server.namenode.INode oldChild,
                   org.apache.hadoop.hdfs.server.namenode.INode newChild)Replace the given child in the created/deleted list, if there is any. | 
| D | saveSelf2Snapshot(int latestSnapshotId,
                 N currentINode,
                 A snapshotCopy)Save the snapshot copy to the latest snapshot. | 
| String | toString() | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic boolean replaceCreatedChild(org.apache.hadoop.hdfs.server.namenode.INode oldChild,
                                   org.apache.hadoop.hdfs.server.namenode.INode newChild)
public boolean removeDeletedChild(org.apache.hadoop.hdfs.server.namenode.INode child)
public int findSnapshotDeleted(org.apache.hadoop.hdfs.server.namenode.INode child)
Snapshot.NO_SNAPSHOT_ID if the
 given inode is not in any of the snapshot.public boolean isEmpty()
public void clear()
public final void deleteSnapshotDiff(INode.ReclaimContext reclaimContext, int snapshot, int prior, N currentINode)
reclaimContext - blocks and inodes that need to be reclaimedsnapshot - The id of the snapshot to be deletedprior - The id of the snapshot taken before the to-be-deleted snapshotcurrentINode - the inode where the snapshot diff is deletedpublic final D getLast()
public final int getLastSnapshotId()
public final int getPrior(int anchorId,
                          boolean exclusive)
anchorId - The returned snapshot's id must be <= or < this
                 given snapshot id.exclusive - True means the returned snapshot's id must be < the
                  given id, otherwise <=.public final int getPrior(int snapshotId)
public final D getDiffById(int snapshotId)
public final int getSnapshotById(int snapshotId)
public final int getDiffIndexById(int snapshotId)
public A getSnapshotINode(int snapshotId,
                          A currentINode)
public D saveSelf2Snapshot(int latestSnapshotId,
                           N currentINode,
                           A snapshotCopy)
public Iterator<D> iterator()
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.