Package com.splout.db.common

Examples of com.splout.db.common.SploutClient.query()


      }
    }

    previousVersion = status.getTablespaceMap().get("pagecountsintegration").getVersion();

    QueryStatus qStatus = client.query("pagecountsintegration", "*", "SELECT * FROM pagecounts;", null);
    System.out.println(qStatus.getResult());

    if(qStatus.getResult() == null) {
      throw new RuntimeException("Something failed as query() is returning null!");
    }
View Full Code Here


    Thread.sleep(2000); // TODO How to improve this.

    // Perform N queries, one to each DNode and validate the resultant data
    for(int i = 0; i < N_DNODES; i++) {
      client = getRandomQNodeClient(random, config);
      QueryStatus qStatus = client.query("p1", ((i * 10) + 1) + "", "SELECT * FROM foo;", null);
      assertEquals((Integer) i, qStatus.getShard());
      assertEquals(10, qStatus.getResult().size());
      for(Object obj : qStatus.getResult()) {
        Map<String, Object> map = (Map<String, Object>) obj;
        assertEquals(randomStr, map.get("strCol"));
View Full Code Here

    int nPartitions = tablespace.getPartitionMap().getPartitionEntries().size();

    // Then gather number of registers for each partition
    for(int partition = 0; partition < nPartitions; partition++) {
      String query = "SELECT MAX(rowid) FROM pagecounts;";
      Map<String, Object> obj = (Map<String, Object>) client
          .query(TABLESPACE, null, query, partition + "").getResult().get(0);
      rowIdsPerPartition.put(partition, Long.parseLong(obj.get("MAX(rowid)").toString()));
    }

    SploutBenchmark benchmark = new SploutBenchmark();
View Full Code Here

      // There might be some delay as they have to receive notifications via Hazelcast etc
      long waitedSoFar = 0;
      QueryStatus status = null;
      SploutClient perQNodeClient = new SploutClient(qnode.getAddress());
      do {
        status = perQNodeClient.query(TABLESPACE, "0", "SELECT * FROM " + TABLE + ";", null);
        Thread.sleep(100);
        waitedSoFar += 100;
        if(waitedSoFar > 5000) {
          throw new AssertionError("Waiting too much on a test condition");
        }
View Full Code Here

      // There might be some delay as they have to receive notifications via Hazelcast etc
      long waitedSoFar = 0;
      QueryStatus status = null;
      SploutClient perQNodeClient = new SploutClient(qnode.getAddress());
      do {
        status = perQNodeClient.query(TABLESPACE, "0", "SELECT * FROM " + TABLE + ";", null);
        Thread.sleep(100);
        waitedSoFar += 100;
        if(waitedSoFar > 5000) {
          throw new AssertionError("Waiting too much on a test condition");
        }
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.