Package com.splout.db.qnode.beans

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


    int tIndex = 0;
    for (TablespaceDepSpec tablespace : deployments) {
      Path tablespaceOut = new Path(tablespace.getSourcePath());

      // Define a DeployRequest for this Tablespace
      deployRequests[tIndex] = new DeployRequest();

      // Splout only accepts absolute URIs
      FileSystem sourceFs = tablespaceOut.getFileSystem(conf);
      if (!sourceFs.exists(tablespaceOut)) {
        throw new IllegalArgumentException("Folder doesn't exist: " + tablespaceOut);
View Full Code Here


    DNode dnode = TestUtils.getTestDNode(config, dHandler, "dnode-" + this.getClass().getName() + "-1");

    try {
      handler.init(config);

      DeployRequest deployRequest1 = new DeployRequest();
      deployRequest1.setTablespace("partition1");
      deployRequest1.setPartitionMap(PartitionMap.oneShardOpenedMap().getPartitionEntries());
      deployRequest1.setReplicationMap(ReplicationMap.oneToOneMap(dnode.getAddress())
          .getReplicationEntries());

      File fakeDeployFolder = new File(FAKE_DEPLOY_FOLDER);
      fakeDeployFolder.mkdir();
      File deployData = new File(fakeDeployFolder, "0.db");
      deployData.createNewFile();
      deployRequest1.setData_uri(fakeDeployFolder.toURI().toString());

      List<DeployRequest> l = new ArrayList<DeployRequest>();
      l.add(deployRequest1);

      handler.deploy(l);
View Full Code Here

    try {
      handler.init(config1);
      ReplicationEntry repEntry1 = new ReplicationEntry(0, dnode1.getAddress(), dnode2.getAddress());
      ReplicationEntry repEntry2 = new ReplicationEntry(0, dnode1.getAddress());

      DeployRequest deployRequest1 = new DeployRequest();
      deployRequest1.setTablespace("partition1");
      deployRequest1.setPartitionMap(PartitionMap.oneShardOpenedMap().getPartitionEntries());
      deployRequest1.setReplicationMap(Arrays.asList(repEntry1));
      deployRequest1.setData_uri("hdfs://foo/bar1");

      DeployRequest deployRequest2 = new DeployRequest();
      deployRequest2.setTablespace("partition2");
      deployRequest2.setPartitionMap(PartitionMap.oneShardOpenedMap().getPartitionEntries());
      deployRequest2.setReplicationMap(Arrays.asList(repEntry2));
      deployRequest2.setData_uri("hdfs://foo/bar2");

      List<DeployRequest> l = new ArrayList<DeployRequest>();
      l.add(deployRequest1);
      l.add(deployRequest2);
View Full Code Here

    try {
      handler.init(config);

      ReplicationEntry repEntry = new ReplicationEntry(0, dnode.getAddress());

      DeployRequest deployRequest = new DeployRequest();
      deployRequest.setTablespace("partition1");
      deployRequest.setPartitionMap(PartitionMap.oneShardOpenedMap().getPartitionEntries());
      deployRequest.setReplicationMap(Arrays.asList(repEntry));
      deployRequest.setData_uri("hdfs://foo/bar");

      List<DeployRequest> l = new ArrayList<DeployRequest>();
      l.add(deployRequest);
      handler.deploy(l);
    } finally {
View Full Code Here

  }

  public DeployInfo deploy(String tablespace, PartitionMap partitionMap, ReplicationMap replicationMap,
      URI dataUri) throws IOException {

    DeployRequest deployRequest = new DeployRequest();
    deployRequest.setTablespace(tablespace);
    deployRequest.setData_uri(dataUri.toString());
    deployRequest.setPartitionMap(partitionMap.getPartitionEntries());
    deployRequest.setReplicationMap(replicationMap.getReplicationEntries());

    return deploy(deployRequest);
  }
View Full Code Here

    try {
      handler.init(config);

      ReplicationEntry repEntry1 = new ReplicationEntry(0, dnode1.getAddress(), dnode2.getAddress());

      DeployRequest deployRequest1 = new DeployRequest();
      deployRequest1.setTablespace("t1");
      deployRequest1.setPartitionMap(PartitionMap.oneShardOpenedMap().getPartitionEntries());
      deployRequest1.setReplicationMap(Arrays.asList(repEntry1));

      File fakeDeployFolder = new File(DEPLOY_FOLDER_THAT_DOESNT_EXIST);
      // Remember we don't create the folder on purpose for making the DNode fail
      deployRequest1.setData_uri(fakeDeployFolder.toURI().toString());

      List<DeployRequest> l = new ArrayList<DeployRequest>();
      l.add(deployRequest1);

      handler.deploy(l);
View Full Code Here

    try {
      handler.init(config);

      ReplicationEntry repEntry1 = new ReplicationEntry(0, dnode1.getAddress(), dnode2.getAddress());

      DeployRequest deployRequest1 = new DeployRequest();
      deployRequest1.setTablespace("partition1");
      deployRequest1.setPartitionMap(PartitionMap.oneShardOpenedMap().getPartitionEntries());
      deployRequest1.setReplicationMap(Arrays.asList(repEntry1));

      File fakeDeployFolder = new File(DEPLOY_FOLDER_THAT_DOESNT_EXIST);
      // Remember we don't create the folder on purpose for making the DNode fail
      deployRequest1.setData_uri(fakeDeployFolder.toURI().toString());

      List<DeployRequest> l = new ArrayList<DeployRequest>();
      l.add(deployRequest1);

      handler.deploy(l);
View Full Code Here

TOP

Related Classes of com.splout.db.qnode.beans.DeployRequest

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.