Examples of Tablespace


Examples of com.splout.db.common.Tablespace

      replicationEntries.add(repEntry);
    }
    // A valid partition map is complete: first min is null and last max is null.
    partitions.get(0).setMin(null);
    partitions.get(partitions.size() - 1).setMax(null);
    return new Tablespace(new PartitionMap(partitions), new ReplicationMap(replicationEntries), 0l, 0l);
  }
View Full Code Here

Examples of com.splout.db.common.Tablespace

    // DNode1 enters with partitions t1/1/0 and t1/2/0
    ctx.updateTablespaceVersions(facade1.getDNodeInfo(), DNodeEvent.ENTRY);
   
    assertEquals(2, ctx.getTablespaceVersionsMap().keySet().size());

    Tablespace tablespaceV1 = ctx.getTablespaceVersionsMap().get(new TablespaceVersion("t1", 1l));
    Tablespace tablespaceV2 = ctx.getTablespaceVersionsMap().get(new TablespaceVersion("t1", 2l));
   
    assertTablespace(tablespaceV1, new Integer[] { 0 }, "dnode1");
    assertTablespace(tablespaceV2, new Integer[] { 0 }, "dnode1");
   
    // DNode2 enters with partitions t1/1/0 and t1/2/1
    // DNode2 enters with partitions t1/3/0 and t2/1/0 too
    DNodeInfoFacade facade2 = new DNodeInfoFacade("dnode2");
    facade2.addTablespaceVersionPartition("t1", 1l, 0);
    facade2.addTablespaceVersionPartition("t1", 2l, 1);
    facade2.addTablespaceVersionPartition("t1", 3l, 0);
    facade2.addTablespaceVersionPartition("t2", 1l, 0);
   
    ctx.updateTablespaceVersions(facade2.getDNodeInfo(), DNodeEvent.ENTRY);

    Tablespace tablespace1V1 = ctx.getTablespaceVersionsMap().get(new TablespaceVersion("t1", 1l));
    Tablespace tablespace1V2 = ctx.getTablespaceVersionsMap().get(new TablespaceVersion("t1", 2l));
    Tablespace tablespace1V3 = ctx.getTablespaceVersionsMap().get(new TablespaceVersion("t1", 3l));
    Tablespace tablespace2V1 = ctx.getTablespaceVersionsMap().get(new TablespaceVersion("t2", 1l));
   
    assertTablespace(tablespace1V1, new Integer[] { 0, 0 }, "dnode1", "dnode2");
    assertTablespace(tablespace1V2, new Integer[] { 0, 1 }, "dnode1", "dnode2");
    assertTablespace(tablespace1V3, new Integer[] { 0 }, "dnode2");
    assertTablespace(tablespace2V1, new Integer[] { 0 }, "dnode2");
View Full Code Here

Examples of com.splout.db.common.Tablespace

    // DNode1 enters with partitions t1/1/0 and t1/2/0
    ctx.updateTablespaceVersions(facade1.getDNodeInfo(), DNodeEvent.ENTRY);
    // DNode2 enters with partitions t1/1/1 and t1/2/1
    ctx.updateTablespaceVersions(facade2.getDNodeInfo(), DNodeEvent.ENTRY);
   
    Tablespace tablespace1V1 = ctx.getTablespaceVersionsMap().get(new TablespaceVersion("t1", 1l));
    Tablespace tablespace1V2 = ctx.getTablespaceVersionsMap().get(new TablespaceVersion("t1", 2l));
    assertTablespace(tablespace1V1, new Integer[] { 0, 1 }, "dnode1", "dnode2");
    assertTablespace(tablespace1V2, new Integer[] { 0, 1 }, "dnode1", "dnode2");
   
    /**
     * Implicit leaving can happen in some cases like if one DNode removes an old version.
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.