Examples of SnapshotSection


Examples of org.apache.hadoop.hdfs.server.namenode.FsImageProto.SnapshotSection

     * directories into {@link INodeDirectorySnapshottable}.
     *
     */
    public void loadSnapshotSection(InputStream in) throws IOException {
      SnapshotManager sm = fsn.getSnapshotManager();
      SnapshotSection section = SnapshotSection.parseDelimitedFrom(in);
      int snum = section.getNumSnapshots();
      sm.setNumSnapshots(snum);
      sm.setSnapshotCounter(section.getSnapshotCounter());
      for (long sdirId : section.getSnapshottableDirList()) {
        INodeDirectory dir = fsDir.getInode(sdirId).asDirectory();
        final INodeDirectorySnapshottable sdir;
        if (!dir.isSnapshottable()) {
          sdir = new INodeDirectorySnapshottable(dir);
          fsDir.addToInodeMap(sdir);
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.FsImageProto.SnapshotSection

     * directories into {@link INodeDirectorySnapshottable}.
     *
     */
    public void loadSnapshotSection(InputStream in) throws IOException {
      SnapshotManager sm = fsn.getSnapshotManager();
      SnapshotSection section = SnapshotSection.parseDelimitedFrom(in);
      int snum = section.getNumSnapshots();
      sm.setNumSnapshots(snum);
      sm.setSnapshotCounter(section.getSnapshotCounter());
      for (long sdirId : section.getSnapshottableDirList()) {
        INodeDirectory dir = fsDir.getInode(sdirId).asDirectory();
        final INodeDirectorySnapshottable sdir;
        if (!dir.isSnapshottable()) {
          sdir = new INodeDirectorySnapshottable(dir);
          fsDir.addToInodeMap(sdir);
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.FsImageProto.SnapshotSection

    out.print("</SnapshotDiffSection>\n");
  }

  private void dumpSnapshotSection(InputStream in) throws IOException {
    out.print("<SnapshotSection>");
    SnapshotSection s = SnapshotSection.parseDelimitedFrom(in);
    o("snapshotCounter", s.getSnapshotCounter());
    if (s.getSnapshottableDirCount() > 0) {
      out.print("<snapshottableDir>");
      for (long id : s.getSnapshottableDirList()) {
        o("dir", id);
      }
      out.print("</snapshottableDir>\n");
    }
    for (int i = 0; i < s.getNumSnapshots(); ++i) {
      SnapshotSection.Snapshot pbs = SnapshotSection.Snapshot
          .parseDelimitedFrom(in);
      o("snapshot", pbs.getSnapshotId());
    }
    out.print("</SnapshotSection>\n");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.