Package com.splout.db.common

Examples of com.splout.db.common.SploutClient$StringHttpContent


    String[] qNodeAddresses = new String[N_QNODES];
    for(int i = 0; i < N_QNODES; i++) {
      qNodeAddresses[i] = getqNodes().get(i).getAddress();
    }

    final SploutClient client = new SploutClient(qNodeAddresses);
    final Tablespace testTablespace = createTestTablespace(N_DNODES);
    final Random random = new Random(SEED);
    final AtomicBoolean failed = new AtomicBoolean(false);
    final AtomicInteger iteration = new AtomicInteger(0);
    final Set<Integer> iterationsSeen = new HashSet<Integer>();

    deployIteration(0, random, client, testTablespace);

    for(QNode qnode : getqNodes()) {
      // Make sure all QNodes are aware of the the first deploy
      // 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


    Server server = new Server(port);

    WebAppContext context = new WebAppContext();
    context.setContextPath("/");
    context.addServlet(new ServletHolder(new DefaultServlet()), "/pagecounts/*");
    context.addServlet(new ServletHolder(new PageCountsServlet(new SploutClient(qNodes.split(",")))), "/api");
    context.addServlet(new ServletHolder(new PageCountsTrendingServlet()), "/trends");

    ResourceCollection resources = new ResourceCollection(new String[] { Resource.newClassPathResource(
        "pagecounts").toString() });

View Full Code Here

    String[] qNodeAddresses = new String[N_QNODES];
    for(int i = 0; i < N_QNODES; i++) {
      qNodeAddresses[i] = getqNodes().get(i).getAddress();
    }

    final SploutClient client = new SploutClient(qNodeAddresses);
    final Tablespace testTablespace = createTestTablespace(N_DNODES);
    final Random random = new Random(SEED);
    final AtomicBoolean failed = new AtomicBoolean(false);

    deployIteration(0, random, client, testTablespace);
   
    for(QNode qnode : getqNodes()) {
      // Make sure all QNodes are aware of the the first deploy
      // 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

  List<DNode> dNodes = new ArrayList<DNode>();
  List<QNode> qNodes = new ArrayList<QNode>();
 
  protected SploutClient getRandomQNodeClient(Random random, SploutConfiguration config) {
    int chosenQnode = Math.abs(random.nextInt()) % qNodes.size();
    return new SploutClient(qNodes.get(chosenQnode).getAddress());
  }
View Full Code Here

TOP

Related Classes of com.splout.db.common.SploutClient$StringHttpContent

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.