Examples of INodeFileAttributes


Examples of org.apache.hadoop.hdfs.server.namenode.INodeFileAttributes

        .getFileSize();
    if (earlierLength != laterLength) { // file length has been changed
      return true;
    }

    INodeFileAttributes earlierAttr = null; // check the metadata
    for (int i = earlierDiffIndex; i < laterDiffIndex; i++) {
      FileDiff diff = diffList.get(i);
      if (diff.snapshotINode != null) {
        earlierAttr = diff.snapshotINode;
        break;
      }
    }
    if (earlierAttr == null) { // no meta-change at all, return false
      return false;
    }
    INodeFileAttributes laterAttr = diffs.getSnapshotINode(
        Math.max(Snapshot.getSnapshotId(from), Snapshot.getSnapshotId(to)),
        file);
    return !earlierAttr.metadataEquals(laterAttr);
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.INodeFileAttributes

      final FileDiffList diffs = new FileDiffList();
      final LoaderContext state = parent.getLoaderContext();
      for (int i = 0; i < size; i++) {
        SnapshotDiffSection.FileDiff pbf = SnapshotDiffSection.FileDiff
            .parseDelimitedFrom(in);
        INodeFileAttributes copy = null;
        if (pbf.hasSnapshotCopy()) {
          INodeSection.INodeFile fileInPb = pbf.getSnapshotCopy();
          PermissionStatus permission = loadPermission(
              fileInPb.getPermission(), state.getStringTable());
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.INodeFileAttributes

        for (int i = diffList.size() - 1; i >= 0; i--) {
          FileDiff diff = diffList.get(i);
          SnapshotDiffSection.FileDiff.Builder fb = SnapshotDiffSection.FileDiff
              .newBuilder().setSnapshotId(diff.getSnapshotId())
              .setFileSize(diff.getFileSize());
          INodeFileAttributes copy = diff.snapshotINode;
          if (copy != null) {
            fb.setName(ByteString.copyFrom(copy.getLocalNameBytes()))
                .setSnapshotCopy(buildINodeFile(copy, parent.getSaverContext()));
          }
          fb.build().writeDelimitedTo(out);
        }
      }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.INodeFileAttributes

    // 2. Load file size
    final long fileSize = in.readLong();
   
    // 3. Load snapshotINode
    final INodeFileAttributes snapshotINode = in.readBoolean()?
        loader.loadINodeFileAttributes(in): null;
   
    return new FileDiff(snapshot.getId(), snapshotINode, posterior, fileSize);
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.INodeFileAttributes

    // 2. Load file size
    final long fileSize = in.readLong();
   
    // 3. Load snapshotINode
    final INodeFileAttributes snapshotINode = in.readBoolean()?
        loader.loadINodeFileAttributes(in): null;
   
    return new FileDiff(snapshot, snapshotINode, posterior, fileSize);
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.INodeFileAttributes

    // 2. Load file size
    final long fileSize = in.readLong();
   
    // 3. Load snapshotINode
    final INodeFileAttributes snapshotINode = in.readBoolean()?
        loader.loadINodeFileAttributes(in): null;
   
    return new FileDiff(snapshot, snapshotINode, posterior, fileSize);
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.INodeFileAttributes

      final FileDiffList diffs = new FileDiffList();
      final LoaderContext state = parent.getLoaderContext();
      for (int i = 0; i < size; i++) {
        SnapshotDiffSection.FileDiff pbf = SnapshotDiffSection.FileDiff
            .parseDelimitedFrom(in);
        INodeFileAttributes copy = null;
        if (pbf.hasSnapshotCopy()) {
          INodeSection.INodeFile fileInPb = pbf.getSnapshotCopy();
          PermissionStatus permission = loadPermission(
              fileInPb.getPermission(), state.getStringTable());
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.INodeFileAttributes

        for (int i = diffList.size() - 1; i >= 0; i--) {
          FileDiff diff = diffList.get(i);
          SnapshotDiffSection.FileDiff.Builder fb = SnapshotDiffSection.FileDiff
              .newBuilder().setSnapshotId(diff.getSnapshotId())
              .setFileSize(diff.getFileSize());
          INodeFileAttributes copy = diff.snapshotINode;
          if (copy != null) {
            fb.setName(ByteString.copyFrom(copy.getLocalNameBytes()))
                .setSnapshotCopy(buildINodeFile(copy, parent.getSaverContext()));
          }
          fb.build().writeDelimitedTo(out);
        }
      }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.INodeFileAttributes

    // 2. Load file size
    final long fileSize = in.readLong();
   
    // 3. Load snapshotINode
    final INodeFileAttributes snapshotINode = in.readBoolean()?
        loader.loadINodeFileAttributes(in): null;
   
    return new FileDiff(snapshot.getId(), snapshotINode, posterior, fileSize);
  }
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.