Package com.splout.db.qnode

Examples of com.splout.db.qnode.QNode.start()


  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());
  }
 
  public static void main(String[] args) throws Exception {
    OneShardEnsemble ensemble = new OneShardEnsemble();
    ensemble.runForever();
View Full Code Here


    CatchAndRetry qNodeInit = new CatchAndRetry(java.net.BindException.class, 50) {

      @Override
      public void businessLogic() throws Throwable {
        QNode qNode = new QNode();
        qNode.start(testConfig, handler);
        reference.set(qNode);
      }

      @Override
      public void retryLogic() {
View Full Code Here

      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());
  }

  public static void main(String[] args) throws Exception {
    NShardEnsemble ensemble = new NShardEnsemble();
    ensemble.runForever(Integer.parseInt(args[0]));
View Full Code Here

 
  @Test
  public void test() throws Exception {
    QNode qnode = new QNode();
    try {
      qnode.start(SploutConfiguration.getTestConfig(), QNODE_HANDLER);
     
      SploutClient client = new SploutClient(qnode.getAddress());
     
      QueryStatus queryStatus = client.query("t1", "k1", "SELECT * FROM foo;", null);
      assertEquals("t1 k1 SELECT * FROM foo;", queryStatus.getError());
View Full Code Here

    testConfig.setProperty(DNodeProperties.HANDLE_TEST_COMMANDS, true);
    final DNode dnode = new DNode(testConfig, new DNodeHandler());
    dnode.init();
   
    final QNode qnode = new QNode();
    qnode.start(testConfig, new QNodeHandler());

    // Wait until the QNode has 1 Dnode in the list
    waitUntilThereAreThatManyDNodes(qnode, 1);
   
    dnode.testCommand(TestCommands.SHUTDOWN.toString());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.