INode.Feature@Private public class FileWithSnapshotFeature extends java.lang.Object implements INode.Feature
| Constructor | Description |
|---|---|
FileWithSnapshotFeature(FileDiffList diffs) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
cleanFile(INode.ReclaimContext reclaimContext,
INodeFile file,
int snapshotId,
int priorSnapshotId,
byte storagePolicyId) |
|
void |
clearDiffs() |
|
void |
collectBlocksAndClear(INode.ReclaimContext reclaimContext,
INodeFile file) |
If some blocks at the end of the block list no longer belongs to
any inode, collect them and update the block list.
|
void |
deleteCurrentFile() |
We need to distinguish two scenarios:
1) the file is still in the current file directory, it has been modified
before while it is included in some snapshot
2) the file is not in the current file directory (deleted), but it is in
some snapshot, thus we still keep this inode
For both scenarios the file has snapshot feature.
|
java.lang.String |
getDetailedString() |
|
FileDiffList |
getDiffs() |
|
short |
getMaxBlockRepInDiffs(FileDiff excluded) |
|
boolean |
isCurrentFileDeleted() |
|
java.lang.String |
toString() |
|
void |
updateQuotaAndCollectBlocks(INode.ReclaimContext reclaimContext,
INodeFile file,
FileDiff removed) |
public FileWithSnapshotFeature(FileDiffList diffs)
public boolean isCurrentFileDeleted()
public void deleteCurrentFile()
isCurrentFileDeleted to true for 2).public FileDiffList getDiffs()
public short getMaxBlockRepInDiffs(FileDiff excluded)
public java.lang.String getDetailedString()
public void cleanFile(INode.ReclaimContext reclaimContext, INodeFile file, int snapshotId, int priorSnapshotId, byte storagePolicyId)
public void clearDiffs()
public void updateQuotaAndCollectBlocks(INode.ReclaimContext reclaimContext, INodeFile file, FileDiff removed)
public void collectBlocksAndClear(INode.ReclaimContext reclaimContext, INodeFile file)
public java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.