Java 类org.apache.hadoop.hdfs.server.namenode.snapshot.INodeDirectoryWithSnapshot.DirectoryDiffList 实例源码

项目:hadoop-plus    文件:SnapshotFSImageFormat.java   
/**
 * 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 {@link Loader} instance that this loading procedure is 
 *               using.
 */
public static void loadDirectoryDiffList(INodeDirectory dir,
    DataInput in, FSImageFormat.Loader loader) throws IOException {
  final int size = in.readInt();
  if (dir instanceof INodeDirectoryWithSnapshot) {
    INodeDirectoryWithSnapshot withSnapshot = (INodeDirectoryWithSnapshot)dir;
    DirectoryDiffList diffs = withSnapshot.getDiffs();
    for (int i = 0; i < size; i++) {
      diffs.addFirst(loadDirectoryDiff(withSnapshot, in, loader));
    }
  }
}
项目:hadoop-TCP    文件:SnapshotFSImageFormat.java   
/**
 * 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 {@link Loader} instance that this loading procedure is 
 *               using.
 */
public static void loadDirectoryDiffList(INodeDirectory dir,
    DataInput in, FSImageFormat.Loader loader) throws IOException {
  final int size = in.readInt();
  if (dir instanceof INodeDirectoryWithSnapshot) {
    INodeDirectoryWithSnapshot withSnapshot = (INodeDirectoryWithSnapshot)dir;
    DirectoryDiffList diffs = withSnapshot.getDiffs();
    for (int i = 0; i < size; i++) {
      diffs.addFirst(loadDirectoryDiff(withSnapshot, in, loader));
    }
  }
}
项目:hardfs    文件:SnapshotFSImageFormat.java   
/**
 * 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 {@link Loader} instance that this loading procedure is 
 *               using.
 */
public static void loadDirectoryDiffList(INodeDirectory dir,
    DataInput in, FSImageFormat.Loader loader) throws IOException {
  final int size = in.readInt();
  if (dir instanceof INodeDirectoryWithSnapshot) {
    INodeDirectoryWithSnapshot withSnapshot = (INodeDirectoryWithSnapshot)dir;
    DirectoryDiffList diffs = withSnapshot.getDiffs();
    for (int i = 0; i < size; i++) {
      diffs.addFirst(loadDirectoryDiff(withSnapshot, in, loader));
    }
  }
}