Package com.splout.db.dnode

Examples of com.splout.db.dnode.DNodeHandler$BalanceActionItemListener


      config = SploutConfiguration.getTestConfig();
      // we need to change some props for avoiding conflicts, ports, etc
      config.setProperty(DNodeProperties.PORT, config.getInt(DNodeProperties.PORT) + i);
      config.setProperty(DNodeProperties.DATA_FOLDER, config.getString(DNodeProperties.DATA_FOLDER) + "-" + i);
      config.setProperty(FetcherProperties.TEMP_DIR, config.getString(FetcherProperties.TEMP_DIR) + "-" + i);
      DNode dnode = new DNode(config, new DNodeHandler());
      dnode.init();
    }
  }
View Full Code Here


*/
public class OneShardEnsemble {

  public void runForever() throws Exception {
    SploutConfiguration config = SploutConfiguration.getTestConfig();
    DNode dnode = new DNode(config, new DNodeHandler());
    dnode.init();
    QNode qnode = new QNode();
    qnode.start(config, new QNodeHandler());
  }
View Full Code Here

    // Replica balancing should already be enabled for tests but we just make it explicit here -->
    config.setProperty(QNodeProperties.REPLICA_BALANCE_ENABLE, true);
    config.setProperty(QNodeProperties.WARMING_TIME, 0);
    config.setProperty(QNodeProperties.DEPLOY_SECONDS_TO_CHECK_ERROR, 1); // this has to be quick for testing
   
    DNodeHandler dHandler = new DNodeHandler();
    DNode dnode1 = TestUtils
        .getTestDNode(config1, dHandler, "dnode-" + this.getClass().getName() + "-1");

    SucceedingDNodeHandler succeed = new SucceedingDNodeHandler();
    DNode dnode2 = TestUtils.getTestDNode(config2, succeed, "dnode-" + this.getClass().getName() + "-2");
View Full Code Here

    SploutConfiguration config1 = SploutConfiguration.getTestConfig();
    SploutConfiguration config2 = SploutConfiguration.getTestConfig();
    // since #12 and #7 we must disable replica balancing which is enabled for testing to fail the deploy
    config.setProperty(QNodeProperties.REPLICA_BALANCE_ENABLE, false);
    config.setProperty(QNodeProperties.DEPLOY_SECONDS_TO_CHECK_ERROR, 1); // this has to be quick for testing
    DNodeHandler dHandler = new DNodeHandler();
    DNode dnode1 = TestUtils
        .getTestDNode(config1, dHandler, "dnode-" + this.getClass().getName() + "-1");

    StuckInDeployHandler stuck = new StuckInDeployHandler();
    DNode dnode2 = TestUtils.getTestDNode(config2, stuck, "dnode-" + this.getClass().getName() + "-2");
View Full Code Here

      config = SploutConfiguration.get();
      // we need to change some props for avoiding conflicts, ports, etc
      config.setProperty(DNodeProperties.PORT, config.getInt(DNodeProperties.PORT) + i);
      config.setProperty(DNodeProperties.DATA_FOLDER, config.getString(DNodeProperties.DATA_FOLDER) + "-" + i);
      config.setProperty(FetcherProperties.TEMP_DIR, config.getString(FetcherProperties.TEMP_DIR) + "-" + i);
      DNode dnode = new DNode(config, new DNodeHandler());
      dnode.init();
    }
    QNode qnode = new QNode();
    qnode.start(config, new QNodeHandler());
  }
View Full Code Here

  @Test
  public void testDeployEnding() throws Throwable {
    // Test what happens when DNodes complete the deploy process
    final QNodeHandler handler = new QNodeHandler();
    SploutConfiguration config = SploutConfiguration.getTestConfig();
    DNodeHandler dHandler = new DNodeHandler();
    DNode dnode = TestUtils.getTestDNode(config, dHandler, "dnode-" + this.getClass().getName() + "-1");

    try {
      handler.init(config);
View Full Code Here

  public void test() throws Throwable {
    final SploutConfiguration config = SploutConfiguration.getTestConfig();
    final QNodeHandler handler = new QNodeHandler();
    QNode qnode = TestUtils.getTestQNode(config, handler);

    DNodeHandler dNodeHandler1 = new DNodeHandler();

    final SploutConfiguration config1 = SploutConfiguration.getTestConfig();

    DNode dnode1 = TestUtils.getTestDNode(config1, dNodeHandler1, "dnode-" + this.getClass().getName()
        + "-1");
View Full Code Here

     * Create an ensemble of DNodes
     */
    for(int i = 0; i < nDnodes; i++) {
      SploutConfiguration dNodeConfig = SploutConfiguration.getTestConfig();
      dNodeConfig.setProperty(DNodeProperties.HANDLE_TEST_COMMANDS, true);
      DNode dnode = TestUtils.getTestDNode(dNodeConfig, new DNodeHandler(), "dnode-" + this.getClass().getName() + "-" + i);
      dNodes.add(dnode);
    }
  }
View Full Code Here

TOP

Related Classes of com.splout.db.dnode.DNodeHandler$BalanceActionItemListener

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.