Java 类org.apache.hadoop.hdfs.server.namenode.INodeWithAdditionalFields 实例源码

项目:hadoop    文件:FSImageFormatPBSnapshot.java   
/**
 * save all the snapshot diff to fsimage
 */
public void serializeSnapshotDiffSection(OutputStream out)
    throws IOException {
  INodeMap inodesMap = fsn.getFSDirectory().getINodeMap();
  final List<INodeReference> refList = parent.getSaverContext()
      .getRefList();
  int i = 0;
  Iterator<INodeWithAdditionalFields> iter = inodesMap.getMapIterator();
  while (iter.hasNext()) {
    INodeWithAdditionalFields inode = iter.next();
    if (inode.isFile()) {
      serializeFileDiffList(inode.asFile(), out);
    } else if (inode.isDirectory()) {
      serializeDirDiffList(inode.asDirectory(), refList, out);
    }
    ++i;
    if (i % FSImageFormatProtobuf.Saver.CHECK_CANCEL_INTERVAL == 0) {
      context.checkCancelled();
    }
  }
  parent.commitSection(headers,
      FSImageFormatProtobuf.SectionName.SNAPSHOT_DIFF);
}
项目:aliyun-oss-hadoop-fs    文件:FSImageFormatPBSnapshot.java   
/**
 * save all the snapshot diff to fsimage
 */
public void serializeSnapshotDiffSection(OutputStream out)
    throws IOException {
  INodeMap inodesMap = fsn.getFSDirectory().getINodeMap();
  final List<INodeReference> refList = parent.getSaverContext()
      .getRefList();
  int i = 0;
  Iterator<INodeWithAdditionalFields> iter = inodesMap.getMapIterator();
  while (iter.hasNext()) {
    INodeWithAdditionalFields inode = iter.next();
    if (inode.isFile()) {
      serializeFileDiffList(inode.asFile(), out);
    } else if (inode.isDirectory()) {
      serializeDirDiffList(inode.asDirectory(), refList, out);
    }
    ++i;
    if (i % FSImageFormatProtobuf.Saver.CHECK_CANCEL_INTERVAL == 0) {
      context.checkCancelled();
    }
  }
  parent.commitSection(headers,
      FSImageFormatProtobuf.SectionName.SNAPSHOT_DIFF);
}
项目:big-c    文件:FSImageFormatPBSnapshot.java   
/**
 * save all the snapshot diff to fsimage
 */
public void serializeSnapshotDiffSection(OutputStream out)
    throws IOException {
  INodeMap inodesMap = fsn.getFSDirectory().getINodeMap();
  final List<INodeReference> refList = parent.getSaverContext()
      .getRefList();
  int i = 0;
  Iterator<INodeWithAdditionalFields> iter = inodesMap.getMapIterator();
  while (iter.hasNext()) {
    INodeWithAdditionalFields inode = iter.next();
    if (inode.isFile()) {
      serializeFileDiffList(inode.asFile(), out);
    } else if (inode.isDirectory()) {
      serializeDirDiffList(inode.asDirectory(), refList, out);
    }
    ++i;
    if (i % FSImageFormatProtobuf.Saver.CHECK_CANCEL_INTERVAL == 0) {
      context.checkCancelled();
    }
  }
  parent.commitSection(headers,
      FSImageFormatProtobuf.SectionName.SNAPSHOT_DIFF);
}
项目:hadoop-2.6.0-cdh5.4.3    文件:FSImageFormatPBSnapshot.java   
/**
 * save all the snapshot diff to fsimage
 */
public void serializeSnapshotDiffSection(OutputStream out)
    throws IOException {
  INodeMap inodesMap = fsn.getFSDirectory().getINodeMap();
  final List<INodeReference> refList = parent.getSaverContext()
      .getRefList();
  int i = 0;
  Iterator<INodeWithAdditionalFields> iter = inodesMap.getMapIterator();
  while (iter.hasNext()) {
    INodeWithAdditionalFields inode = iter.next();
    if (inode.isFile()) {
      serializeFileDiffList(inode.asFile(), out);
    } else if (inode.isDirectory()) {
      serializeDirDiffList(inode.asDirectory(), refList, out);
    }
    ++i;
    if (i % FSImageFormatProtobuf.Saver.CHECK_CANCEL_INTERVAL == 0) {
      context.checkCancelled();
    }
  }
  parent.commitSection(headers,
      FSImageFormatProtobuf.SectionName.SNAPSHOT_DIFF);
}
项目:FlexMap    文件:FSImageFormatPBSnapshot.java   
/**
 * save all the snapshot diff to fsimage
 */
public void serializeSnapshotDiffSection(OutputStream out)
    throws IOException {
  INodeMap inodesMap = fsn.getFSDirectory().getINodeMap();
  final List<INodeReference> refList = parent.getSaverContext()
      .getRefList();
  int i = 0;
  Iterator<INodeWithAdditionalFields> iter = inodesMap.getMapIterator();
  while (iter.hasNext()) {
    INodeWithAdditionalFields inode = iter.next();
    if (inode.isFile()) {
      serializeFileDiffList(inode.asFile(), out);
    } else if (inode.isDirectory()) {
      serializeDirDiffList(inode.asDirectory(), refList, out);
    }
    ++i;
    if (i % FSImageFormatProtobuf.Saver.CHECK_CANCEL_INTERVAL == 0) {
      context.checkCancelled();
    }
  }
  parent.commitSection(headers,
      FSImageFormatProtobuf.SectionName.SNAPSHOT_DIFF);
}
项目:hadoop-on-lustre2    文件:FSImageFormatPBSnapshot.java   
/**
 * save all the snapshot diff to fsimage
 */
public void serializeSnapshotDiffSection(OutputStream out)
    throws IOException {
  INodeMap inodesMap = fsn.getFSDirectory().getINodeMap();
  final List<INodeReference> refList = parent.getSaverContext()
      .getRefList();
  int i = 0;
  Iterator<INodeWithAdditionalFields> iter = inodesMap.getMapIterator();
  while (iter.hasNext()) {
    INodeWithAdditionalFields inode = iter.next();
    if (inode.isFile()) {
      serializeFileDiffList(inode.asFile(), out);
    } else if (inode.isDirectory()) {
      serializeDirDiffList(inode.asDirectory(), refList, out);
    }
    ++i;
    if (i % FSImageFormatProtobuf.Saver.CHECK_CANCEL_INTERVAL == 0) {
      context.checkCancelled();
    }
  }
  parent.commitSection(headers,
      FSImageFormatProtobuf.SectionName.SNAPSHOT_DIFF);
}