Class FileDiff
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.snapshot.FileDiff
- All Implemented Interfaces:
Comparable<Integer>
The difference of an
INodeFile between two snapshots.-
Method Summary
Modifier and TypeMethodDescriptionfinal intCompare diffs with snapshot ID.voiddestroyAndCollectSnapshotBlocks(INode.BlocksMapUpdateInfo collectedBlocks) longfinal intvoidCopy block references into the snapshot up to the currentfileSize.toString()
-
Method Details
-
getFileSize
public long getFileSize()- Returns:
- the file size in the snapshot.
-
setBlocks
Copy block references into the snapshot up to the currentfileSize. Should be done only once. -
getBlocks
-
toString
-
destroyAndCollectSnapshotBlocks
-
compareTo
Compare diffs with snapshot ID.- Specified by:
compareToin interfaceComparable<N extends INode>
-
getSnapshotId
public final int getSnapshotId()- Returns:
- the snapshot object of this diff.
-