Class INode.ReclaimContext
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.INode.ReclaimContext
- Enclosing class:
- INode
Context object to record blocks and inodes that need to be reclaimed
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BlockStoragePolicySuiteprotected final INode.BlocksMapUpdateInfo -
Constructor Summary
ConstructorsConstructorDescriptionReclaimContext(BlockStoragePolicySuite bsps, INode.BlocksMapUpdateInfo collectedBlocks, List<INode> removedINodes, List<Long> removedUCFiles) -
Method Summary
Modifier and TypeMethodDescriptiongetCopy()make a copy with the same collectedBlocks, removedINodes, and removedUCFiles but a new quotaDelta.intForFSEditLogOpCodes.OP_DELETE_SNAPSHOT, return the snapshot to be deleted.intgetSnapshotIdToBeDeleted(int snapshotId, INode inode) voidsetSnapshotToBeDeleted(Snapshot snapshot) Set the snapshot to be deleted forFSEditLogOpCodes.OP_DELETE_SNAPSHOT.
-
Field Details
-
bsps
-
collectedBlocks
-
removedINodes
-
removedUCFiles
-
-
Constructor Details
-
ReclaimContext
public ReclaimContext(BlockStoragePolicySuite bsps, INode.BlocksMapUpdateInfo collectedBlocks, List<INode> removedINodes, List<Long> removedUCFiles) - Parameters:
bsps- block storage policy suite to calculate intended storage type usagecollectedBlocks- blocks collected from the descents for further block deletion/update will be added to the given map.removedINodes- INodes collected from the descents for further cleaning up ofremovedUCFiles- INodes whose leases need to be released
-
-
Method Details
-
setSnapshotToBeDeleted
Set the snapshot to be deleted forFSEditLogOpCodes.OP_DELETE_SNAPSHOT.- Parameters:
snapshot- the snapshot to be deleted
-
getSnapshotIdToBeDeleted
public int getSnapshotIdToBeDeleted()ForFSEditLogOpCodes.OP_DELETE_SNAPSHOT, return the snapshot to be deleted. For other ops, returnSnapshot.CURRENT_STATE_ID. -
getSnapshotIdToBeDeleted
-
storagePolicySuite
-
collectedBlocks
-
quotaDelta
-
getCopy
make a copy with the same collectedBlocks, removedINodes, and removedUCFiles but a new quotaDelta.
-