Class ContentSummaryComputationContext

java.lang.Object
org.apache.hadoop.hdfs.server.namenode.ContentSummaryComputationContext

@Private @Unstable public class ContentSummaryComputationContext extends Object
  • Field Details

  • Constructor Details

    • ContentSummaryComputationContext

      public ContentSummaryComputationContext(FSDirectory dir, FSNamesystem fsn, long limitPerRun, long sleepMicroSec)
      Constructor
      Parameters:
      dir - The FSDirectory instance
      fsn - The FSNamesystem instance
      limitPerRun - allowed number of operations in one locking period. 0 or a negative number means no limit (i.e. no yielding)
    • ContentSummaryComputationContext

      public ContentSummaryComputationContext(FSDirectory dir, FSNamesystem fsn, long limitPerRun, long sleepMicroSec, FSPermissionChecker pc)
    • ContentSummaryComputationContext

      public ContentSummaryComputationContext(BlockStoragePolicySuite bsps)
      Constructor for blocking computation.
  • Method Details

    • getYieldCount

      public long getYieldCount()
      Return current yield count
    • yield

      public boolean yield()
      Relinquish locks held during computation for a short while and reacquire them. This will give other threads a chance to acquire the contended locks and run.
      Returns:
      true if locks were released and reacquired.
    • getCounts

      public ContentCounts getCounts()
      Get the content counts
    • getSnapshotCounts

      public ContentCounts getSnapshotCounts()
    • getBlockStoragePolicySuite

      public BlockStoragePolicySuite getBlockStoragePolicySuite()
    • getErasureCodingPolicyName

      public String getErasureCodingPolicyName(INode inode)
      Get the erasure coding policy.