Package org.apache.hadoop.hbase.util

Examples of org.apache.hadoop.hbase.util.ChaosMonkey$Action


        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("user.address.city", "London");
        parameters.put("user.address['postal']", "QJR387");
        parameters.put("user.name", "Superman");

        Action action = new SimpleAction();
        pi.setParameters(action, stack, parameters);

        assertEquals(true, pi.isOrdered());
        assertEquals(3, actual.size());
        assertEquals("London", actual.get("user.address.city"));
View Full Code Here


        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put(sb.toString(), "");
        parameters.put("huuhaa", "");

        Action action = new SimpleAction();
        parametersInterceptor.setParameters(action, stack, parameters);
        assertEquals(1, actual.size());
    }
View Full Code Here

    public void testNoParametersAction() throws Exception {
        ParametersInterceptor interceptor = new ParametersInterceptor();
        interceptor.init();

        MockActionInvocation mai = new MockActionInvocation();
        Action action = new NoParametersAction();
        mai.setAction(action);

        interceptor.doIntercept(mai);
        interceptor.destroy();
    }
View Full Code Here

        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("user.address.city", "London");
        parameters.put("user.name", "Superman");

        Action action = new SimpleAction();
        pi.setParameters(action, stack, parameters);

        assertEquals("ordered should be false by default", false, pi.isOrdered());
        assertEquals(2, actual.size());
        assertEquals("London", actual.get("user.address.city"));
View Full Code Here

        Map<String, Object> parameters = new HashMap<String, Object>();
        parameters.put("user.address.city", "London");
        parameters.put("user.address['postal']", "QJR387");
        parameters.put("user.name", "Superman");

        Action action = new SimpleAction();
        pi.setParameters(action, stack, parameters);

        assertEquals(true, pi.isOrdered());
        assertEquals(3, actual.size());
        assertEquals("London", actual.get("user.address.city"));
View Full Code Here

  private ChaosMonkey monkey;

  @Before
  public void setUp() throws Exception {
    super.setUp(NUM_SLAVES_BASE);
    monkey = new ChaosMonkey(util, ChaosMonkey.EVERY_MINUTE_RANDOM_ACTION_POLICY);
    monkey.start();
  }
View Full Code Here

        new RestartActiveMaster(5000),
        new RollingBatchRestartRs(5000, 1.0f),
        new RestartRsHoldingMeta(35000),
        new RestartRsHoldingRoot(35000)
    };
    monkey = new ChaosMonkey(util, new ChaosMonkey.CompositeSequentialPolicy(
            new ChaosMonkey.DoActionsOncePolicy(CHAOS_EVERY_MS, actions),
            new ChaosMonkey.PeriodicRandomActionPolicy(CHAOS_EVERY_MS, actions)));
    monkey.start();
  }
View Full Code Here

  private ChaosMonkey monkey;

  @Before
  public void setUp() throws Exception {
    super.setUp(NUM_SLAVES_BASE);
    monkey = new ChaosMonkey(util, ChaosMonkey.EVERY_MINUTE_RANDOM_ACTION_POLICY);
    monkey.start();
  }
View Full Code Here

  public void setUp() throws Exception {
    super.setUp(NUM_SLAVES_BASE);

    ChaosMonkey.Policy chaosPolicy = new ChaosMonkey.PeriodicRandomActionPolicy(
      CHAOS_EVERY_MS, new UnbalanceKillAndRebalanceAction());
    monkey = new ChaosMonkey(util, chaosPolicy);
    monkey.start();
  }
View Full Code Here

    protected Object handleGetEffect()
    {
        // Effect is mapped to action, not activity
        // We return the first action encountered in the activity
        Action effectAction = null;
        Activity effect = this.metaObject.getEffect();
        if (effect != null)
        {
            Collection nodes = effect.getNodes();
            for (Iterator nodesIt = nodes.iterator(); nodesIt.hasNext() && effectAction == null;)
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.util.ChaosMonkey$Action

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.