@InterfaceAudience.Private
@InterfaceStability.Evolving
public interface SpaceViolationPolicyEnforcement
SpaceViolationPolicy
.
Implementations must have a public, no-args constructor.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 |
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. |
SpaceQuotaSnapshot |
getQuotaSnapshot()
Returns the
SpaceQuotaSnapshot this was initialized with. |
void |
initialize(RegionServerServices rss,
TableName tableName,
SpaceQuotaSnapshot snapshot)
Initializes this policy instance.
|
boolean |
shouldCheckBulkLoads()
Returns whether thet caller should verify any bulk loads against
this . |
void initialize(RegionServerServices rss, TableName tableName, SpaceQuotaSnapshot snapshot)
void enable() throws IOException
IOException
void disable() throws IOException
IOException
void check(Mutation m) throws SpaceLimitingException
Mutation
against this
policy. If the
Mutation
violates the policy, this policy should throw a
SpaceLimitingException
.SpaceLimitingException
- When the given mutation violates this policy.String getPolicyName()
SpaceViolationPolicy
that this enforcement is for.boolean areCompactionsDisabled()
SpaceQuotaSnapshot getQuotaSnapshot()
SpaceQuotaSnapshot
this
was initialized with.boolean shouldCheckBulkLoads()
this
.void checkBulkLoad(org.apache.hadoop.fs.FileSystem fs, List<String> paths) throws SpaceLimitingException
this
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.SpaceLimitingException
Copyright © 2007–2019 Cloudera. All rights reserved.