final ChildrenDiff diff = new ChildrenDiff(); INodeDirectory dir = node.asDirectory(); if (processFlag) {
byte[][] relativePath = parentPath.toArray(new byte[parentPath.size()][]); if (node.isDirectory()) { final ChildrenDiff diff = new ChildrenDiff(); INodeDirectory dir = node.asDirectory(); DirectoryWithSnapshotFeature sf = dir.getDirectoryWithSnapshotFeature();
combined = previous.getChildrenDiff(level + 1); } else { combined = new ChildrenDiff(); combined.combinePosterior(previous.getChildrenDiff(level), null); combined.combinePosterior(node.getChildrenDiff(level), null);
byte[][] relativePath = parentPath.toArray(new byte[parentPath.size()][]); if (node.isDirectory()) { final ChildrenDiff diff = new ChildrenDiff(); INodeDirectory dir = node.asDirectory(); DirectoryWithSnapshotFeature sf = dir.getDirectoryWithSnapshotFeature();
byte[][] relativePath = parentPath.toArray(new byte[parentPath.size()][]); if (node.isDirectory()) { final ChildrenDiff diff = new ChildrenDiff(); INodeDirectory dir = node.asDirectory(); DirectoryWithSnapshotFeature sf = dir.getDirectoryWithSnapshotFeature();
private DirectoryDiff(int snapshotId, INodeDirectory dir) { super(snapshotId, null, null); this.childrenSize = dir.getChildrenList(Snapshot.CURRENT_STATE_ID).size(); this.diff = new ChildrenDiff(); }
private DirectoryDiff(int snapshotId, INodeDirectory dir) { super(snapshotId, null, null); this.childrenSize = dir.getChildrenList(Snapshot.CURRENT_STATE_ID).size(); this.diff = new ChildrenDiff(); }
/** Constructor used by FSImage loading */ DirectoryDiff(int snapshotId, INodeDirectoryAttributes snapshotINode, DirectoryDiff posteriorDiff, int childrenSize, List<INode> createdList, List<INode> deletedList, boolean isSnapshotRoot) { super(snapshotId, snapshotINode, posteriorDiff); this.childrenSize = childrenSize; this.diff = new ChildrenDiff(createdList, deletedList); this.isSnapshotRoot = isSnapshotRoot; }
/** Constructor used by FSImage loading */ DirectoryDiff(int snapshotId, INodeDirectoryAttributes snapshotINode, DirectoryDiff posteriorDiff, int childrenSize, List<INode> createdList, List<INode> deletedList, boolean isSnapshotRoot) { super(snapshotId, snapshotINode, posteriorDiff); this.childrenSize = childrenSize; this.diff = new ChildrenDiff(createdList, deletedList); this.isSnapshotRoot = isSnapshotRoot; }
private static ChildrenDiff combineDiff(SkipListNode from, SkipListNode to, int level) { ChildrenDiff combined = null; ChildrenDiff first = null; SkipListNode cur = from; for (int i = level - 1; i >= 0; i--) { while (cur != to) { final SkipListNode next = cur.getSkipNode(i); if (next == null) { break; } if (first == null) { first = cur.getChildrenDiff(i); } else { if (combined == null) { combined = new ChildrenDiff(); combined.combinePosterior(first, null); } combined.combinePosterior(cur.getChildrenDiff(i), null); } cur = next; } } return combined != null? combined: first; }
private DirectoryDiff(int snapshotId, INodeDirectory dir) { this(snapshotId, dir, new ChildrenDiff()); }
/** Constructor used by FSImage loading */ DirectoryDiff(int snapshotId, INodeDirectoryAttributes snapshotINode, DirectoryDiff posteriorDiff, int childrenSize, List<INode> createdList, List<INode> deletedList, boolean isSnapshotRoot) { super(snapshotId, snapshotINode, posteriorDiff); this.childrenSize = childrenSize; this.diff = new ChildrenDiff(createdList, deletedList); this.isSnapshotRoot = isSnapshotRoot; }