Examples of FileWithSnapshotFeature


Examples of org.apache.hadoop.hdfs.server.namenode.snapshot.FileWithSnapshotFeature

      }
    }
  }

  private void computeContentSummary4Current(final Content.Counts counts) {
    FileWithSnapshotFeature sf = this.getFileWithSnapshotFeature();
    if (sf != null && sf.isCurrentFileDeleted()) {
      return;
    }

    counts.add(Content.LENGTH, computeFileSize());
    counts.add(Content.FILE, 1);
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.snapshot.FileWithSnapshotFeature

  /**
   * Compute file size of the current file if the given snapshot is null;
   * otherwise, get the file size from the given snapshot.
   */
  public final long computeFileSize(int snapshotId) {
    FileWithSnapshotFeature sf = this.getFileWithSnapshotFeature();
    if (snapshotId != CURRENT_STATE_ID && sf != null) {
      final FileDiff d = sf.getDiffs().getDiffById(snapshotId);
      if (d != null) {
        return d.getFileSize();
      }
    }
    return computeFileSize(true, false);
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.snapshot.FileWithSnapshotFeature

  /* Start of Snapshot Feature */

  public FileWithSnapshotFeature addSnapshotFeature(FileDiffList diffs) {
    Preconditions.checkState(!isWithSnapshot(),
        "File is already with snapshot");
    FileWithSnapshotFeature sf = new FileWithSnapshotFeature(diffs);
    this.addFeature(sf);
    return sf;
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.snapshot.FileWithSnapshotFeature

    return getFileWithSnapshotFeature() != null;
  }
   
  @Override
  public String toDetailString() {
    FileWithSnapshotFeature sf = this.getFileWithSnapshotFeature();
    return super.toDetailString() + (sf == null ? "" : sf.getDetailedString());
  }
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.