/** * Load the {@link SnapshotDiff} list for the INodeDirectoryWithSnapshot * directory. * * @param dir * The snapshottable directory for loading. * @param in * The {@link DataInput} instance to read. * @param loader * The loader */ public static void loadDirectoryDiffList(INodeDirectory dir, DataInput in, FSImageFormat.Loader loader) throws IOException { final int size = in.readInt(); if (dir.isWithSnapshot()) { DirectoryDiffList diffs = dir.getDiffs(); for (int i = 0; i < size; i++) { diffs.addFirst(loadDirectoryDiff(dir, in, loader)); } } }
/** * Load the {@link SnapshotDiff} list for the INodeDirectoryWithSnapshot * directory. * * @param dir * The snapshottable directory for loading. * @param in * The {@link DataInput} instance to read. * @param loader * The loader */ public static void loadDirectoryDiffList(INodeDirectory dir, DataInput in, FSImageFormat.Loader loader) throws IOException { final int size = in.readInt(); if (dir.isWithSnapshot()) { DirectoryDiffList diffs = dir.getDiffs(); for (int i = 0; i < size; i++) { diffs.addFirst(loadDirectoryDiff(dir, in, loader)); } } }
/** * Load the {@link SnapshotDiff} list for the INodeDirectoryWithSnapshot * directory. * * @param dir * The snapshottable directory for loading. * @param in * The {@link DataInput} instance to read. * @param loader * The loader */ public static void loadDirectoryDiffList(INodeDirectory dir, DataInput in, FSImageFormat.Loader loader) throws IOException { final int size = in.readInt(); if (dir.isWithSnapshot()) { DirectoryDiffList diffs = dir.getDiffs(); for (int i = 0; i < size; i++) { diffs.addFirst(loadDirectoryDiff(dir, in, loader)); } } }