Class ContentSummaryComputationContext
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.ContentSummaryComputationContext
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for blocking computation.ContentSummaryComputationContext(FSDirectory dir, FSNamesystem fsn, long limitPerRun, long sleepMicroSec) ConstructorContentSummaryComputationContext(FSDirectory dir, FSNamesystem fsn, long limitPerRun, long sleepMicroSec, FSPermissionChecker pc) -
Method Summary
Modifier and TypeMethodDescriptionGet the content countsgetErasureCodingPolicyName(INode inode) Get the erasure coding policy.longReturn current yield countbooleanyield()Relinquish locks held during computation for a short while and reacquire them.
-
Field Details
-
REPLICATED
- See Also:
-
LOG
public static final org.slf4j.Logger LOG
-
-
Constructor Details
-
ContentSummaryComputationContext
public ContentSummaryComputationContext(FSDirectory dir, FSNamesystem fsn, long limitPerRun, long sleepMicroSec) Constructor- Parameters:
dir- The FSDirectory instancefsn- The FSNamesystem instancelimitPerRun- 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
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
Get the content counts -
getSnapshotCounts
-
getBlockStoragePolicySuite
-
getErasureCodingPolicyName
Get the erasure coding policy.
-