Examples of buildKeyspace()


Examples of com.pardot.rhombus.ConnectionManager.buildKeyspace()

    //Build our keyspace definition object
    CKeyspaceDefinition definition = JsonUtil.objectFromJsonResource(CKeyspaceDefinition.class, this.getClass().getClassLoader(), "ShardedKeyspace.js");

    //Rebuild the keyspace and get the object mapper
    cm.buildKeyspace(definition, true);
    cm.setDefaultKeyspace(definition);
    ObjectMapper om = cm.getObjectMapper();
    om.setLogCql(true);

    long insertNum = 18l;
View Full Code Here

Examples of com.pardot.rhombus.ConnectionManager.buildKeyspace()

    CKeyspaceDefinition definition = JsonUtil.objectFromJsonResource(CKeyspaceDefinition.class
        , this.getClass().getClassLoader(), "CKeyspaceTestData.js");
    assertNotNull(definition);

    //Build the same keyspace but do not force a rebuild
    cm.buildKeyspace(definition, false);

    //verify that we saved the keyspace definition in cassandra correctly
    CKeyspaceDefinition queriedDef = cm.hydrateLatestKeyspaceDefinitionFromCassandra(definition.getName());
    assertEquals(definition.getDefinitions().size(), queriedDef.getDefinitions().size());
    assertEquals(queriedDef.getDefinitions().get("testtype").getField("foreignid").getType(), CField.CDataType.BIGINT);
View Full Code Here

Examples of com.pardot.rhombus.ConnectionManager.buildKeyspace()

    //Build the keyspace forcing a rebuild in case anything has been left behind
    CKeyspaceDefinition definition = JsonUtil.objectFromJsonResource(CKeyspaceDefinition.class
        , this.getClass().getClassLoader(), "CKeyspaceTestData.js");
    assertNotNull(definition);
    cm.buildKeyspace(definition, true);

    //Build the keyspace without forcing a rebuild, but adding another index
    CKeyspaceDefinition definition2 = JsonUtil.objectFromJsonResource(CKeyspaceDefinition.class
        , this.getClass().getClassLoader(), "CKeyspaceTestData2.js");
    assertNotNull(definition2);
View Full Code Here

Examples of com.pardot.rhombus.ConnectionManager.buildKeyspace()

    //Build the keyspace without forcing a rebuild, but adding another index
    CKeyspaceDefinition definition2 = JsonUtil.objectFromJsonResource(CKeyspaceDefinition.class
        , this.getClass().getClassLoader(), "CKeyspaceTestData2.js");
    assertNotNull(definition2);
    cm.buildKeyspace(definition2, false);

    //Select from the newly created table
    ObjectMapper om = cm.getObjectMapper(definition2);
    ResultSet rs = om.getCqlExecutor().executeSync(CQLStatement.make("SELECT * FROM testtype3cb23c7ffc4256283064bd5eae1886b4", "testtype"));
    assertEquals(0, rs.all().size());
View Full Code Here

Examples of com.pardot.rhombus.ConnectionManager.buildKeyspace()

    // Set up a connection manager and build the cluster and keyspace
    ConnectionManager cm = getConnectionManager();
    CKeyspaceDefinition definition = JsonUtil.objectFromJsonResource(CKeyspaceDefinition.class
        , this.getClass().getClassLoader(), "CKeyspaceTestData.js");
    assertNotNull(definition);
    cm.buildKeyspace(definition, false);

    // Drop the keyspace
    cm.dropKeyspace(definition.getName());

    // Make sure it is really dropped
View Full Code Here

Examples of com.pardot.rhombus.ConnectionManager.buildKeyspace()

    //This test requires that the keyspace be dropped before running
    cm.dropKeyspace(OldKeyspaceDefinition.getName());
    cm.dropKeyspace(cm.getRhombusKeyspaceName());

    //Rebuild the keyspace and get the object mapper
    cm.buildKeyspace(OldKeyspaceDefinition, true);
    ObjectMapper om = cm.getObjectMapper(OldKeyspaceDefinition.getName());

    //insert some data
    //Get a test object to insert
    Map<String, Object> testObject = JsonUtil.rhombusMapFromJsonMap(TestHelpers.getTestObject(0), OldKeyspaceDefinition.getDefinitions().get("testtype"));
View Full Code Here

Examples of com.pardot.rhombus.ConnectionManager.buildKeyspace()

    CKeyspaceDefinition definition = JsonUtil.objectFromJsonResource(CKeyspaceDefinition.class, this.getClass().getClassLoader(), "CKeyspaceTestData.js");
    assertNotNull(definition);
    definition.getDefinitions().get("testtype");

    //Build the keyspace, get the object mapper, and truncate data
    cm.buildKeyspace(definition, true);
    cm.setDefaultKeyspace(definition);
    ObjectMapper om = cm.getObjectMapper(definition.getName());
    om.setExecuteAsync(false);

    //Insert one object which is filtered and one which is not
View Full Code Here

Examples of com.pardot.rhombus.ConnectionManager.buildKeyspace()

    CKeyspaceDefinition definition = JsonUtil.objectFromJsonResource(CKeyspaceDefinition.class, this.getClass().getClassLoader(), "CKeyspaceTestData.js");
    assertNotNull(definition);
    definition.getDefinitions().get("testtype");

    //Build the keyspace, get the object mapper, and truncate data
    cm.buildKeyspace(definition, true);
    cm.setDefaultKeyspace(definition);
    ObjectMapper om = cm.getObjectMapper(definition.getName());
    om.setExecuteAsync(false);

    Map<String, Object> testObject;
View Full Code Here

Examples of com.pardot.rhombus.ConnectionManager.buildKeyspace()

    CKeyspaceDefinition definition = JsonUtil.objectFromJsonResource(CKeyspaceDefinition.class, this.getClass().getClassLoader(), "CKeyspaceTestData.js");
    assertNotNull(definition);
    definition.getDefinitions().get("testtype");

    //Build the keyspace, get the object mapper, and truncate data
    cm.buildKeyspace(definition, true);
    cm.setDefaultKeyspace(definition);
    ObjectMapper om = cm.getObjectMapper(definition.getName());
    om.setExecuteAsync(false);

    Map<String, Object> testObject;
View Full Code Here

Examples of com.pardot.rhombus.ConnectionManager.buildKeyspace()

    //Build our keyspace definition object
    CKeyspaceDefinition definition = JsonUtil.objectFromJsonResource(CKeyspaceDefinition.class, this.getClass().getClassLoader(), "CKeyspaceTestData.js");
    assertNotNull(definition);

    //Rebuild the keyspace and get the object mapper
    cm.buildKeyspace(definition, true);
    cm.setDefaultKeyspace(definition);
    ObjectMapper om = cm.getObjectMapper(definition.getName());

    //Get a test object to insert
    Map<String, Object> testObject = JsonUtil.rhombusMapFromJsonMap(TestHelpers.getTestObject(0), definition.getDefinitions().get("testtype"));
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.