@InterfaceAudience.Private public class DefaultViolationPolicyEnforcement extends AbstractViolationPolicyEnforcement
SpaceViolationPolicyEnforcement. This is done because all
tables, whether or not they're in violation now, should be checking bulk loads to proactively
catch a swell of files that would push the table into violation.quotaSnapshot, rss, tableName| Constructor and Description |
|---|
DefaultViolationPolicyEnforcement() |
| Modifier and Type | Method and Description |
|---|---|
private long |
addSingleFile(org.apache.hadoop.fs.FileSystem fs,
String path) |
void |
check(Mutation m)
Checks the given
Mutation against this policy. |
void |
checkBulkLoad(org.apache.hadoop.fs.FileSystem fs,
List<String> paths)
Checks the file at the given path against
this policy and the current
SpaceQuotaSnapshot. |
void |
disable()
Disables this policy.
|
void |
enable()
Enables this policy.
|
String |
getPolicyName()
Returns a logical name for the
SpaceViolationPolicy that this enforcement is for. |
boolean |
shouldCheckBulkLoads()
Returns whether thet caller should verify any bulk loads against
this. |
areCompactionsDisabled, getQuotaSnapshot, getRegionServerServices, getTableName, initialize, setQuotaSnapshot, setRegionServerServices, setTableNamepublic DefaultViolationPolicyEnforcement()
public void enable() throws IOException
SpaceViolationPolicyEnforcementIOExceptionpublic void disable() throws IOException
SpaceViolationPolicyEnforcementIOExceptionpublic String getPolicyName()
SpaceViolationPolicyEnforcementSpaceViolationPolicy that this enforcement is for.public 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 boolean shouldCheckBulkLoads()
SpaceViolationPolicyEnforcementthis.public void checkBulkLoad(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.SpaceLimitingExceptionprivate long addSingleFile(org.apache.hadoop.fs.FileSystem fs, String path) throws SpaceLimitingException
SpaceLimitingExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.