@InterfaceAudience.Private public final class MissingSnapshotViolationPolicyEnforcement extends AbstractViolationPolicyEnforcement
SpaceViolationPolicyEnforcement which can be treated as a singleton. When a quota is
 not defined on a table or we lack quota information, we want to avoid creating a policy, keeping
 this path fast.| Modifier and Type | Field and Description | 
|---|---|
| private static MissingSnapshotViolationPolicyEnforcement | SINGLETON | 
quotaSnapshot, rss, tableName| Modifier | Constructor and Description | 
|---|---|
| private  | MissingSnapshotViolationPolicyEnforcement() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | check(Mutation m)Checks the given  Mutationagainstthispolicy. | 
| long | computeBulkLoadSize(org.apache.hadoop.fs.FileSystem fs,
                   List<String> paths)Computes the size of the file(s) at the given path against  thispolicy and the
 currentSpaceQuotaSnapshot. | 
| void | disable()Disables this policy. | 
| void | enable()Enables this policy. | 
| static SpaceViolationPolicyEnforcement | getInstance() | 
| String | getPolicyName()Returns a logical name for the  SpaceViolationPolicythat this enforcement is for. | 
| boolean | shouldCheckBulkLoads()Returns whether thet caller should verify any bulk loads against  this. | 
areCompactionsDisabled, getFileSize, getQuotaSnapshot, getRegionServerServices, getTableName, initialize, setQuotaSnapshot, setRegionServerServices, setTableNameprivate static final MissingSnapshotViolationPolicyEnforcement SINGLETON
private MissingSnapshotViolationPolicyEnforcement()
public static SpaceViolationPolicyEnforcement getInstance()
public boolean shouldCheckBulkLoads()
SpaceViolationPolicyEnforcementthis.public long computeBulkLoadSize(org.apache.hadoop.fs.FileSystem fs, List<String> paths) throws SpaceLimitingException
SpaceViolationPolicyEnforcementthis policy and the
 current SpaceQuotaSnapshot. If the file would violate the policy, a
 SpaceLimitingException will be thrown.paths - The paths in HDFS to files to be bulk loaded.SpaceLimitingExceptionpublic void enable() throws IOException
SpaceViolationPolicyEnforcementIOExceptionpublic void disable() throws IOException
SpaceViolationPolicyEnforcementIOExceptionpublic void check(Mutation m) throws SpaceLimitingException
SpaceViolationPolicyEnforcementMutation against this policy. If the
 Mutation violates the policy, this policy should throw a
 SpaceLimitingException.SpaceLimitingException - When the given mutation violates this policy.public String getPolicyName()
SpaceViolationPolicyEnforcementSpaceViolationPolicy that this enforcement is for.Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.