org.apache.accumulo.core.constraints
Class DefaultKeySizeConstraint

java.lang.Object
  extended by org.apache.accumulo.core.constraints.DefaultKeySizeConstraint
All Implemented Interfaces:
Constraint

public class DefaultKeySizeConstraint
extends Object
implements Constraint

A constraints that limits the size of keys to 1mb.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.accumulo.core.constraints.Constraint
Constraint.Environment
 
Field Summary
protected static short MAX__KEY_SIZE_EXCEEDED_VIOLATION
           
protected static long maxSize
           
 
Constructor Summary
DefaultKeySizeConstraint()
           
 
Method Summary
 List<Short> check(Constraint.Environment env, Mutation mutation)
          Checks a mutation for constrain violations.
 String getViolationDescription(short violationCode)
          Implementers of this method should return a short one sentence description of what a given violation code means.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX__KEY_SIZE_EXCEEDED_VIOLATION

protected static final short MAX__KEY_SIZE_EXCEEDED_VIOLATION
See Also:
Constant Field Values

maxSize

protected static final long maxSize
See Also:
Constant Field Values
Constructor Detail

DefaultKeySizeConstraint

public DefaultKeySizeConstraint()
Method Detail

getViolationDescription

public String getViolationDescription(short violationCode)
Description copied from interface: Constraint
Implementers of this method should return a short one sentence description of what a given violation code means.

Specified by:
getViolationDescription in interface Constraint

check

public List<Short> check(Constraint.Environment env,
                         Mutation mutation)
Description copied from interface: Constraint
Checks a mutation for constrain violations. If the mutation contains no violations, then the implementation should return null. Otherwise it should return a list of violation codes. Violation codes must be non negative. Negative violation codes are reserved for system use.

Specified by:
check in interface Constraint


Copyright © 2015 Apache Accumulo Project. All rights reserved.