Class DefaultKeySizeConstraint
java.lang.Object
org.apache.accumulo.core.data.constraints.DefaultKeySizeConstraint
- All Implemented Interfaces:
Constraint
A constraints that limits the size of keys to 1mb.
This was moved from the org.apache.accumulo.core.constraints package since 2.1.0
- Since:
- 2.1.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.accumulo.core.data.constraints.Constraint
Constraint.Environment -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final shortprotected static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheck(Constraint.Environment env, Mutation mutation) Checks a mutation for constraint violations.getViolationDescription(short violationCode) Gets a short, one-sentence description of what a given violation code means.
-
Field Details
-
MAX__KEY_SIZE_EXCEEDED_VIOLATION
protected static final short MAX__KEY_SIZE_EXCEEDED_VIOLATION- See Also:
-
maxSize
protected static final long maxSize- See Also:
-
-
Constructor Details
-
DefaultKeySizeConstraint
public DefaultKeySizeConstraint()
-
-
Method Details
-
getViolationDescription
Description copied from interface:ConstraintGets a short, one-sentence description of what a given violation code means.- Specified by:
getViolationDescriptionin interfaceConstraint- Parameters:
violationCode- numeric violation code- Returns:
- matching violation description
-
check
Description copied from interface:ConstraintChecks a mutation for constraint violations. If the mutation contains no violations, returns null. Otherwise, returns a list of violation codes. Violation codes must be non-negative. Negative violation codes are reserved for system use.- Specified by:
checkin interfaceConstraint- Parameters:
env- constraint environmentmutation- mutation to check- Returns:
- list of violation codes, or null if none
-