filesRemoved = context.quotaDelta().getNsDelta(); fsd.updateReplicationFactor(context.collectedBlocks() .toUpdateReplicationInfo()); fsn.removeSnapshottableDirs(snapshottableDirs);
boolean cleanDst( BlockStoragePolicySuite bsps, BlocksMapUpdateInfo collectedBlocks) { Preconditions.checkState(oldDstChild != null); List<INode> removedINodes = new ChunkedArrayList<>(); List<Long> removedUCFiles = new ChunkedArrayList<>(); INode.ReclaimContext context = new INode.ReclaimContext( bsps, collectedBlocks, removedINodes, removedUCFiles); final boolean filesDeleted; if (!oldDstChild.isInLatestSnapshot(dstIIP.getLatestSnapshotId())) { oldDstChild.destroyAndCollectBlocks(context); filesDeleted = true; } else { oldDstChild.cleanSubtree(context, Snapshot.CURRENT_STATE_ID, dstIIP.getLatestSnapshotId()); filesDeleted = context.quotaDelta().getNsDelta() >= 0; } fsd.updateReplicationFactor(context.collectedBlocks() .toUpdateReplicationInfo()); fsd.getFSNamesystem().removeLeasesAndINodes( removedUCFiles, removedINodes, false); return filesDeleted; }
fsd.updateCount(iip, context.quotaDelta(), false); fsd.removeFromInodeMap(removedINodes); fsd.updateReplicationFactor(context.collectedBlocks() .toUpdateReplicationInfo()); } finally {