Package org.apache.accumulo.server.constraints

Examples of org.apache.accumulo.server.constraints.ConstraintChecker


    persistedTime = tabletTime.getTime();
   
    acuTableConf.addObserver(configObserver = new ConfigurationObserver() {
     
      private void reloadConstraints() {
        constraintChecker.set(new ConstraintChecker(getTableConfiguration()));
      }
     
      public void propertiesChanged() {
        reloadConstraints();
       
View Full Code Here


    commitSession.updateMaxCommittedTime(time);
    return commitSession;
  }
 
  public void checkConstraints() {
    ConstraintChecker cc = constraintChecker.get();
   
    if (cc.classLoaderChanged()) {
      ConstraintChecker ncc = new ConstraintChecker(getTableConfiguration());
      constraintChecker.compareAndSet(cc, ncc);
    }
  }
View Full Code Here

    }
  }

  public CommitSession prepareMutationsForCommit(TservConstraintEnv cenv, List<Mutation> mutations) throws TConstraintViolationException {
   
    ConstraintChecker cc = constraintChecker.get();
   
    List<Mutation> violators = null;
    Violations violations = new Violations();
    cenv.setExtent(extent);
    for (Mutation mutation : mutations) {
      Violations more = cc.check(cenv, mutation);
      if (more != null) {
        violations.add(more);
        if (violators == null)
          violators = new ArrayList<Mutation>();
        violators.add(mutation);
View Full Code Here

   
    acuTableConf.addObserver(configObserver = new ConfigurationObserver() {
     
      private void reloadConstraints() {
       
        ConstraintChecker cc = null;
       
        try {
          log.debug("Reloading constraints");
          cc = ConstraintLoader.load(extent.getTableId().toString());
        } catch (IOException e) {
          log.error("Failed to reload constraints for " + extent, e);
          cc = new ConstraintChecker();
          cc.addConstraint(new UnsatisfiableConstraint((short) -1, "Failed to reload constraints, not accepting mutations."));
        }
       
        constraintChecker.set(cc);
      }
     
View Full Code Here

    return commitSession;
  }
 
  public CommitSession prepareMutationsForCommit(TservConstraintEnv cenv, List<Mutation> mutations) throws TConstraintViolationException {
   
    ConstraintChecker cc = constraintChecker.get();
   
    List<Mutation> violators = null;
    Violations violations = new Violations();
    cenv.setExtent(extent);
    for (Mutation mutation : mutations) {
      Violations more = cc.check(cenv, mutation);
      if (more != null) {
        violations.add(more);
        if (violators == null)
          violators = new ArrayList<Mutation>();
        violators.add(mutation);
View Full Code Here

    persistedTime = tabletTime.getTime();
   
    acuTableConf.addObserver(configObserver = new ConfigurationObserver() {
     
      private void reloadConstraints() {
        constraintChecker.set(new ConstraintChecker(getTableConfiguration()));
      }
     
      public void propertiesChanged() {
        reloadConstraints();
       
View Full Code Here

    commitSession.updateMaxCommittedTime(time);
    return commitSession;
  }
 
  public void checkConstraints() {
    ConstraintChecker cc = constraintChecker.get();
   
    if (cc.classLoaderChanged()) {
      ConstraintChecker ncc = new ConstraintChecker(getTableConfiguration());
      constraintChecker.compareAndSet(cc, ncc);
    }
  }
View Full Code Here

    }
  }

  public CommitSession prepareMutationsForCommit(TservConstraintEnv cenv, List<Mutation> mutations) throws TConstraintViolationException {
   
    ConstraintChecker cc = constraintChecker.get();
   
    List<Mutation> violators = null;
    Violations violations = new Violations();
    cenv.setExtent(extent);
    for (Mutation mutation : mutations) {
      Violations more = cc.check(cenv, mutation);
      if (more != null) {
        violations.add(more);
        if (violators == null)
          violators = new ArrayList<Mutation>();
        violators.add(mutation);
View Full Code Here

   
    acuTableConf.addObserver(configObserver = new ConfigurationObserver() {
     
      private void reloadConstraints() {
       
        ConstraintChecker cc = null;
       
        try {
          log.debug("Reloading constraints");
          cc = ConstraintLoader.load(extent.getTableId().toString());
        } catch (IOException e) {
          log.error("Failed to reload constraints for " + extent, e);
          cc = new ConstraintChecker();
          cc.addConstraint(new UnsatisfiableConstraint((short) -1, "Failed to reload constraints, not accepting mutations."));
        }
       
        constraintChecker.set(cc);
      }
     
View Full Code Here

    return commitSession;
  }
 
  public CommitSession prepareMutationsForCommit(List<Mutation> mutations) throws TConstraintViolationException {
   
    ConstraintChecker cc = constraintChecker.get();
   
    List<Mutation> violators = null;
    Violations violations = new Violations();
    for (Mutation mutation : mutations) {
      Violations more = cc.check(extent, mutation);
      if (more != null) {
        violations.add(more);
        if (violators == null)
          violators = new ArrayList<Mutation>();
        violators.add(mutation);
View Full Code Here

TOP

Related Classes of org.apache.accumulo.server.constraints.ConstraintChecker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.