Examples of QNodeStatus


Examples of com.splout.db.qnode.beans.QNodeStatus

        "-sep", "\" \"", "-p", "2", "-e", engine }) < 0) {
      throw new RuntimeException("Generator failed!");
    }

    SploutClient client = new SploutClient(qnode);
    QNodeStatus status = client.overview();
    long previousVersion = -1;
    if(status.getTablespaceMap().get("pagecountsintegration") != null) {
      previousVersion = status.getTablespaceMap().get("pagecountsintegration").getVersion();
    }

    DeployerCMD deployer = new DeployerCMD();
    deployer.setConf(getConf());
    if(deployer.run(new String[] { "-r", "2", "-q", qnode, "-root", tmpHdfsPath + "/output", "-ts",
        "pagecountsintegration" }) < 0) {
      throw new RuntimeException("Deployer failed!");
    }

    long waitedSoFar = 0;

    status = client.overview();
    while(status.getTablespaceMap().get("pagecountsintegration") == null
        || previousVersion == status.getTablespaceMap().get("pagecountsintegration").getVersion()) {
      Thread.sleep(2000);
      waitedSoFar += 2000;
      status = client.overview();
      if(waitedSoFar > 90000) {
        throw new RuntimeException(
            "Deploy must have failed in Splout's server. Waiting too much for it to complete.");
      }
    }

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

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

    if(qStatus.getResult() == null) {
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.