Package org.apache.hadoop.hbase.chaos.policies

Examples of org.apache.hadoop.hbase.chaos.policies.Policy


    util.initializeCluster(clusterSize);
  }

  @Override
  public void setUpMonkey() throws Exception {
    Policy p = new PeriodicRandomActionPolicy(sleepTime,
      new RestartRsHoldingTableAction(sleepTime, tableName.getNameAsString()),
      new MoveRandomRegionOfTableAction(tableName));
    this.monkey = new PolicyBasedChaosMonkey(util, p);
    // don't start monkey right away
  }
View Full Code Here


  private long waitAfterBalanceMilliSec;

  @Override
  public ChaosMonkey build() {
    loadProperties();
    Policy chaosPolicy = new PeriodicRandomActionPolicy(chaosEveryMilliSec,
        new UnbalanceKillAndRebalanceAction(waitForUnbalanceMilliSec, waitForKillMilliSec,
            waitAfterBalanceMilliSec));

    return new PolicyBasedChaosMonkey(util, chaosPolicy);
  }
View Full Code Here

    util.initializeCluster(clusterSize);
  }

  @Override
  public void setUpMonkey() throws Exception {
    Policy p = new PeriodicRandomActionPolicy(sleepTime,
      new RestartRandomRsExceptMetaAction(sleepTime),
      new MoveRandomRegionOfTableAction(tableName));
    this.monkey = new PolicyBasedChaosMonkey(util, p);
    // don't start monkey right away
  }
View Full Code Here

   * can cause test to fail when Put runs out of retries. */
  private static final long CHAOS_EVERY_MS = 65 * 1000;

  @Override
  public ChaosMonkey build() {
    Policy chaosPolicy = new PeriodicRandomActionPolicy(
        CHAOS_EVERY_MS,
        new UnbalanceKillAndRebalanceAction()
    );

    return new PolicyBasedChaosMonkey(util, chaosPolicy);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.chaos.policies.Policy

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.