public abstract class AbstractViolationPolicyEnforcement extends Object implements SpaceViolationPolicyEnforcement
SpaceViolationPolicyEnforcement
.Constructor and Description |
---|
AbstractViolationPolicyEnforcement() |
Modifier and Type | Method and Description |
---|---|
boolean |
areCompactionsDisabled()
Returns whether or not compactions on this table should be disabled for this policy.
|
void |
checkBulkLoad(FileSystem fs,
List<String> paths)
Checks the file at the given path against
this policy and the current
SpaceQuotaSnapshot . |
SpaceQuotaSnapshot |
getQuotaSnapshot()
Returns the
SpaceQuotaSnapshot this was initialized with. |
RegionServerServices |
getRegionServerServices() |
TableName |
getTableName() |
void |
initialize(RegionServerServices rss,
TableName tableName,
SpaceQuotaSnapshot snapshot)
Initializes this policy instance.
|
void |
setQuotaSnapshot(SpaceQuotaSnapshot snapshot) |
void |
setRegionServerServices(RegionServerServices rss) |
void |
setTableName(TableName tableName) |
boolean |
shouldCheckBulkLoads()
Returns whether the caller should verify any bulk loads against
this . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
check, disable, enable, getPolicyName
public void setRegionServerServices(RegionServerServices rss)
public void setTableName(TableName tableName)
public RegionServerServices getRegionServerServices()
public TableName getTableName()
public void setQuotaSnapshot(SpaceQuotaSnapshot snapshot)
public SpaceQuotaSnapshot getQuotaSnapshot()
SpaceViolationPolicyEnforcement
SpaceQuotaSnapshot
this
was initialized with.getQuotaSnapshot
in interface SpaceViolationPolicyEnforcement
public void initialize(RegionServerServices rss, TableName tableName, SpaceQuotaSnapshot snapshot)
SpaceViolationPolicyEnforcement
initialize
in interface SpaceViolationPolicyEnforcement
public boolean areCompactionsDisabled()
SpaceViolationPolicyEnforcement
areCompactionsDisabled
in interface SpaceViolationPolicyEnforcement
public boolean shouldCheckBulkLoads()
SpaceViolationPolicyEnforcement
this
.shouldCheckBulkLoads
in interface SpaceViolationPolicyEnforcement
public void checkBulkLoad(FileSystem fs, List<String> paths) throws SpaceLimitingException
SpaceViolationPolicyEnforcement
this
policy and the current
SpaceQuotaSnapshot
. If the file would violate the policy, a
SpaceLimitingException
will be thrown.checkBulkLoad
in interface SpaceViolationPolicyEnforcement
paths
- The paths in HDFS to files to be bulk loaded.SpaceLimitingException