Examples of DeployAction


Examples of com.splout.db.thrift.DeployAction

        }
        for(String dNode : rEntry.getNodes()) {
          List<DeployAction> actionsSoFar = (List<DeployAction>) MapUtils.getObject(actions, dNode,
              new ArrayList<DeployAction>());
          actions.put(dNode, actionsSoFar);
          DeployAction deployAction = new DeployAction();
          deployAction.setDataURI(req.getData_uri() + "/" + rEntry.getShard() + ".db");
          deployAction.setTablespace(req.getTablespace());
          deployAction.setVersion(version);
          deployAction.setPartition(rEntry.getShard());

          // Add partition metadata to the deploy action for DNodes to save it
          PartitionMetadata metadata = new PartitionMetadata();
          metadata.setMinKey(pEntry.getMin());
          metadata.setMaxKey(pEntry.getMax());
          metadata.setNReplicas(rEntry.getNodes().size());
          metadata.setDeploymentDate(deployDate);
          metadata.setInitStatements(req.getInitStatements());
          metadata.setEngineId(req.getEngine());

          deployAction.setMetadata(metadata);
          actionsSoFar.add(deployAction);
        }
      }
    }
    return actions;
View Full Code Here

Examples of com.splout.db.thrift.DeployAction

    DNode dnode = TestUtils.getTestDNode(testConfig, dHandler, "dnode-" + this.getClass().getName() + "-1");
    //
    DNodeService.Client client = DNodeClient.get("localhost", testConfig.getInt(DNodeProperties.PORT));

    try {
      DeployAction deploy = new DeployAction();
      deploy.setTablespace("tablespace3");
      deploy.setDataURI("file:///foo");
      deploy.setPartition(0);
      deploy.setVersion(1l);
      deploy.setMetadata(new PartitionMetadata());
      client.deploy(Arrays.asList(new DeployAction[] { deploy }), 1l);
      waitForDeployToFinish(client);

      Assert.assertEquals(true, dHandler.lastDeployTimedout.get());
      Assert.assertEquals(false, dHandler.deployInProgress.get() > 0);
View Full Code Here

Examples of com.splout.db.thrift.DeployAction

    DNode dnode = TestUtils.getTestDNode(testConfig, dHandler, "dnode-" + this.getClass().getName() + "-2");
    //
    DNodeService.Client client = DNodeClient.get("localhost", testConfig.getInt(DNodeProperties.PORT));

    try {
      DeployAction deploy = new DeployAction();
      deploy.setTablespace("tablespace1");
      deploy.setDataURI(new File(DB_1 + ".1", "foo.db").toURI().toString());
      deploy.setPartition(0);
      deploy.setVersion(1l);
      deploy.setMetadata(new PartitionMetadata());
      client.deploy(Arrays.asList(new DeployAction[] { deploy }), 1l);
     
      Thread.sleep(1000);
      waitForDeployToFinish(client);

      Thread.sleep(200);
     
      Assert.assertEquals(false, dHandler.lastDeployTimedout.get());
      Assert.assertEquals(false, dHandler.deployInProgress.get() > 0);

      client.sqlQuery("tablespace1", 1l, 0, "SELECT 1;");
      Assert.assertEquals(dHandler.dbCache.getKeysWithExpiryCheck().size(), 1);

      deploy = new DeployAction();
      deploy.setTablespace("tablespace1");
      deploy.setDataURI(new File(DB_2 + ".1", "foo.db").toURI().toString());
      deploy.setPartition(0);
      deploy.setVersion(2l);
      deploy.setMetadata(new PartitionMetadata());
      client.deploy(Arrays.asList(new DeployAction[] { deploy }), 2l);
     
      Thread.sleep(1000);
      waitForDeployToFinish(client);
View Full Code Here

Examples of com.splout.db.thrift.DeployAction

    DNode dnode = TestUtils.getTestDNode(testConfig, dHandler, "dnode-" + this.getClass().getName() + "-3");
    //
    DNodeService.Client client = DNodeClient.get("localhost", testConfig.getInt(DNodeProperties.PORT));

    try {
      DeployAction deploy = new DeployAction();
      deploy.setTablespace("tablespace1");
      deploy.setDataURI(new File(DB_1 + ".2", "foo.db").toURI().toString());
      deploy.setVersion(1l);
      deploy.setPartition(0);
      deploy.setMetadata(new PartitionMetadata());
      client.deploy(Arrays.asList(new DeployAction[] { deploy }), 1l);
      waitForDeployToFinish(client);

      Thread.sleep(200);
     
      Assert.assertEquals(false, dHandler.lastDeployTimedout.get());
      Assert.assertEquals(false, dHandler.deployInProgress.get() > 0);

      deploy = new DeployAction();
      deploy.setTablespace("tablespace1");
      deploy.setDataURI(new File(DB_2 + ".2", "foo.db").toURI().toString());
      deploy.setVersion(2l);
      deploy.setPartition(0);
      deploy.setMetadata(new PartitionMetadata());
      client.deploy(Arrays.asList(new DeployAction[] { deploy }), 2l);
      waitForDeployToFinish(client);

      ArrayList resultsV1 = JSONSerDe.deSer(client.sqlQuery("tablespace1", 1l, 0, "SELECT * FROM t;"),
          ArrayList.class);
View Full Code Here

Examples of com.splout.db.thrift.DeployAction

    DNodeHandler dHandler = new DNodeHandler();
    DNode dnode = TestUtils.getTestDNode(testConfig, dHandler, dataFolder);
    //
    DNodeService.Client client = DNodeClient.get("localhost", testConfig.getInt(DNodeProperties.PORT));
    try {
      DeployAction deploy = new DeployAction();
      deploy.setTablespace("tablespace2");
      TestUtils.createFooDatabase(FOO_DEPLOY_FOLDER, 1, "foo");
      deploy.setDataURI(new File(FOO_DEPLOY_FOLDER, "foo.db").toURI().toString());
      deploy.setPartition(0);
      deploy.setVersion(1l);
      deploy.setMetadata(new PartitionMetadata());
      client.deploy(Arrays.asList(new DeployAction[] { deploy }), 1l);
      waitForDeployToFinish(client);
      Thread.sleep(200);
      File expectedDataFolder = dHandler.getLocalStorageFolder("tablespace2", 0, 1);
      Assert.assertTrue(expectedDataFolder.exists());
View Full Code Here

Examples of org.jboss.as.cli.gui.metacommand.DeployAction

    private static JMenu makeDeploymentsMenu(CliGuiContext cliGuiCtx) {
        JMenu metaCmdMenu = new JMenu("Deployments");
        metaCmdMenu.setMnemonic(KeyEvent.VK_D);

        JMenuItem deploy = new JMenuItem(new DeployAction(cliGuiCtx));
        deploy.setMnemonic(KeyEvent.VK_D);
        metaCmdMenu.add(deploy);

        JMenuItem unDeploy = new JMenuItem(new UndeployAction(cliGuiCtx));
        unDeploy.setMnemonic(KeyEvent.VK_U);
View Full Code Here

Examples of org.jboss.as.cli.gui.metacommand.DeployAction

    private static JMenu makeMetaCmdMenu(CliGuiContext cliGuiCtx) {
        JMenu metaCmdMenu = new JMenu("Meta Commands");
        metaCmdMenu.setMnemonic(KeyEvent.VK_M);


        JMenuItem deploy = new JMenuItem(new DeployAction(cliGuiCtx));
        deploy.setMnemonic(KeyEvent.VK_D);
        metaCmdMenu.add(deploy);

        JMenuItem unDeploy = new JMenuItem(new UndeployAction(cliGuiCtx));
        deploy.setMnemonic(KeyEvent.VK_U);
View Full Code Here

Examples of org.jboss.gwt.circuit.sample.wmm.actions.DeployAction

                            iterator.remove();
                        }
                    }
                }
                else if (action instanceof DeployAction) {
                    DeployAction deployAction = (DeployAction) action;
                    Deployment deployment = deployAction.getDeployment();
                    deployments.put(deployment.getName(), deployment.getServer());
                } else if (action instanceof UndeployAction) {
                    UndeployAction undeployAction = (UndeployAction) action;
                    Deployment deployment = undeployAction.getDeployment();
                    deployments.remove(deployment.getName(), deployment.getServer());
View Full Code Here

Examples of org.jboss.gwt.circuit.sample.wmm.actions.DeployAction

                            iterator.remove();
                        }
                    }
                }
                else if (action instanceof DeployAction) {
                    DeployAction deployAction = (DeployAction) action;
                    Deployment deployment = deployAction.getPayload();
                    deployments.put(deployment.getName(), deployment.getServer());
                } else if (action instanceof UndeployAction) {
                    UndeployAction undeployAction = (UndeployAction) action;
                    Deployment deployment = undeployAction.getPayload();
                    deployments.remove(deployment.getName(), deployment.getServer());
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.