Package org.apache.hadoop.hbase.quotas
Interface SpaceViolationPolicyEnforcement
- All Known Implementing Classes:
 AbstractViolationPolicyEnforcement,DefaultViolationPolicyEnforcement,DisableTableViolationPolicyEnforcement,MissingSnapshotViolationPolicyEnforcement,NoInsertsViolationPolicyEnforcement,NoWritesCompactionsViolationPolicyEnforcement,NoWritesViolationPolicyEnforcement
RegionServer implementation of 
SpaceViolationPolicy. Implementations must have a public,
 no-args constructor.- 
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether or not compactions on this table should be disabled for this policy.voidChecks the givenMutationagainstthispolicy.longcomputeBulkLoadSize(org.apache.hadoop.fs.FileSystem fs, List<String> paths) Computes the size of the file(s) at the given path againstthispolicy and the currentSpaceQuotaSnapshot.voiddisable()Disables this policy.voidenable()Enables this policy.Returns a logical name for theSpaceViolationPolicythat this enforcement is for.Returns theSpaceQuotaSnapshotthiswas initialized with.voidinitialize(RegionServerServices rss, TableName tableName, SpaceQuotaSnapshot snapshot) Initializes this policy instance.booleanReturns whether thet caller should verify any bulk loads againstthis. 
- 
Method Details
- 
initialize
Initializes this policy instance. - 
enable
Enables this policy. Not all policies have enable actions.- Throws:
 IOException
 - 
disable
Disables this policy. Not all policies have disable actions.- Throws:
 IOException
 - 
check
Checks the givenMutationagainstthispolicy. If theMutationviolates the policy, this policy should throw aSpaceLimitingException.- Throws:
 SpaceLimitingException- When the given mutation violates this policy.
 - 
getPolicyName
Returns a logical name for theSpaceViolationPolicythat this enforcement is for. - 
areCompactionsDisabled
boolean areCompactionsDisabled()Returns whether or not compactions on this table should be disabled for this policy. - 
getQuotaSnapshot
Returns theSpaceQuotaSnapshotthiswas initialized with. - 
shouldCheckBulkLoads
boolean shouldCheckBulkLoads()Returns whether thet caller should verify any bulk loads againstthis. - 
computeBulkLoadSize
long computeBulkLoadSize(org.apache.hadoop.fs.FileSystem fs, List<String> paths) throws SpaceLimitingException Computes the size of the file(s) at the given path againstthispolicy and the currentSpaceQuotaSnapshot. If the file would violate the policy, aSpaceLimitingExceptionwill be thrown.- Parameters:
 paths- The paths in HDFS to files to be bulk loaded.- Returns:
 - The size, in bytes, of the files that would be loaded.
 - Throws:
 SpaceLimitingException
 
 -