public class BulkLoadCheckingViolationPolicyEnforcement extends AbstractViolationPolicyEnforcement
SpaceViolationPolicyEnforcement
instance which only checks for bulk loads. Useful for tables
which have no violation policy. This is the default case for tables, as we want to make sure that
a single bulk load call would violate the quota.
This is the default implementation asConstructor and Description |
---|
BulkLoadCheckingViolationPolicyEnforcement() |
Modifier and Type | Method and Description |
---|---|
boolean |
areCompactionsDisabled()
Returns whether or not compactions on this table should be disabled for this policy.
|
void |
check(Mutation m)
Checks the given
Mutation against this policy. |
void |
disable()
Disables this policy.
|
void |
enable()
Enables this policy.
|
String |
getPolicyName()
Returns a logical name for the
SpaceViolationPolicy that this enforcement is for. |
checkBulkLoad, getQuotaSnapshot, getRegionServerServices, getTableName, initialize, setQuotaSnapshot, setRegionServerServices, setTableName, shouldCheckBulkLoads
public BulkLoadCheckingViolationPolicyEnforcement()
public void enable()
SpaceViolationPolicyEnforcement
public void disable()
SpaceViolationPolicyEnforcement
public String getPolicyName()
SpaceViolationPolicyEnforcement
SpaceViolationPolicy
that this enforcement is for.public boolean areCompactionsDisabled()
SpaceViolationPolicyEnforcement
areCompactionsDisabled
in interface SpaceViolationPolicyEnforcement
areCompactionsDisabled
in class AbstractViolationPolicyEnforcement
public void check(Mutation m) throws SpaceLimitingException
SpaceViolationPolicyEnforcement
Mutation
against this
policy. If the
Mutation
violates the policy, this policy should throw a
SpaceLimitingException
.SpaceLimitingException
- When the given mutation violates this policy.