Examples of describeKeyspace()


Examples of me.prettyprint.hector.api.Cluster.describeKeyspace()

    Cluster cluster = HFactory.getOrCreateCluster("Test Cluster", "localhost:9171");
    List<KeyspaceDefinition> keyspaces = cluster.describeKeyspaces();
    assertThat(cluster.describeKeyspaces(), notNullValue());
    assertThat(keyspaces.size(), is(3));
    assertThat(cluster.describeKeyspace("mykeyspacename"), notNullValue());
    assertThat(cluster.describeKeyspace("mykeyspacename").getName(), is("mykeyspacename"));

    Keyspace keyspace = HFactory.createKeyspace("mykeyspacename", cluster);
    RangeSlicesQuery<byte[], byte[], byte[]> query = HFactory.createRangeSlicesQuery(
        keyspace,
        BytesArraySerializer.get(),
View Full Code Here

Examples of me.prettyprint.hector.api.Cluster.describeKeyspace()

  private void test() throws Exception {
    Cluster cluster = HFactory.getOrCreateCluster("Test Cluster", "localhost:9171");
    List<KeyspaceDefinition> keyspaces = cluster.describeKeyspaces();
    assertThat(cluster.describeKeyspaces(), notNullValue());
    assertThat(keyspaces.size(), is(3));
    assertThat(cluster.describeKeyspace("mykeyspacename"), notNullValue());
    assertThat(cluster.describeKeyspace("mykeyspacename").getName(), is("mykeyspacename"));

    Keyspace keyspace = HFactory.createKeyspace("mykeyspacename", cluster);
    RangeSlicesQuery<byte[], byte[], byte[]> query = HFactory.createRangeSlicesQuery(
        keyspace,
View Full Code Here

Examples of me.prettyprint.hector.api.Cluster.describeKeyspace()

    Cluster cluster = HFactory.getOrCreateCluster("Test Cluster", "localhost:9171");
    List<KeyspaceDefinition> keyspaces = cluster.describeKeyspaces();
    assertThat(cluster.describeKeyspaces(), notNullValue());
    assertThat(keyspaces.size(), is(3));
    assertThat(cluster.describeKeyspace("mykeyspacename"), notNullValue());
    assertThat(cluster.describeKeyspace("mykeyspacename").getName(), is("mykeyspacename"));

    Keyspace keyspace = HFactory.createKeyspace("mykeyspacename", cluster);
    RangeSlicesQuery<byte[], byte[], byte[]> query = HFactory.createRangeSlicesQuery(
        keyspace,
        BytesArraySerializer.get(),
View Full Code Here

Examples of me.prettyprint.hector.api.Cluster.describeKeyspace()

        CassandraUnitCommandLineLoader.main(args);

    /* test */
        Cluster cluster = HFactory.getOrCreateCluster(clusterName, host);
        assertDefaultValuesSchemaExist(cluster);
        assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getReplicationFactor(), not(2));
        assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getReplicationFactor(), is(1));
        assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getStrategyClass(),
                not("org.apache.cassandra.locator.NetworkTopologyStrategy"));
        assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getStrategyClass(),
                is("org.apache.cassandra.locator.SimpleStrategy"));
View Full Code Here

Examples of me.prettyprint.hector.api.Cluster.describeKeyspace()

    /* test */
        Cluster cluster = HFactory.getOrCreateCluster(clusterName, host);
        assertDefaultValuesSchemaExist(cluster);
        assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getReplicationFactor(), not(2));
        assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getReplicationFactor(), is(1));
        assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getStrategyClass(),
                not("org.apache.cassandra.locator.NetworkTopologyStrategy"));
        assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getStrategyClass(),
                is("org.apache.cassandra.locator.SimpleStrategy"));
        EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
View Full Code Here

Examples of me.prettyprint.hector.api.Cluster.describeKeyspace()

    /* test */
        Cluster cluster = HFactory.getOrCreateCluster(clusterName, host);
        assertDefaultValuesSchemaExist(cluster);
        assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getReplicationFactor(), not(2));
        assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getReplicationFactor(), is(1));
        assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getStrategyClass(),
                not("org.apache.cassandra.locator.NetworkTopologyStrategy"));
        assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getStrategyClass(),
                is("org.apache.cassandra.locator.SimpleStrategy"));
        EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
    }
View Full Code Here

Examples of me.prettyprint.hector.api.Cluster.describeKeyspace()

        assertDefaultValuesSchemaExist(cluster);
        assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getReplicationFactor(), not(2));
        assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getReplicationFactor(), is(1));
        assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getStrategyClass(),
                not("org.apache.cassandra.locator.NetworkTopologyStrategy"));
        assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getStrategyClass(),
                is("org.apache.cassandra.locator.SimpleStrategy"));
        EmbeddedCassandraServerHelper.cleanEmbeddedCassandra();
    }

View Full Code Here

Examples of me.prettyprint.hector.api.Cluster.describeKeyspace()

 
  @Test
    @Ignore // Does not support the start of two configurations in the same JVM Instance
    public void shouldStartCassandraServer ()  {
        Cluster cluster = HFactory.getOrCreateCluster("anotherCluster", "localhost:9175");
        KeyspaceDefinition keyspaceDefinition = cluster.describeKeyspace("system");
        assertThat(keyspaceDefinition, notNullValue());

    }
 
}
View Full Code Here

Examples of me.prettyprint.hector.api.Cluster.describeKeyspace()

  @Test
    @Ignore // Does not support the start of two configurations in the same JVM Instance
    public void shouldStartCassandraServer ()  {
        Cluster cluster = HFactory.getOrCreateCluster("anotherCluster", "localhost:9175");
        KeyspaceDefinition keyspaceDefinition = cluster.describeKeyspace("system");
        assertThat(keyspaceDefinition, notNullValue());

    }

  @Override
View Full Code Here

Examples of me.prettyprint.hector.api.Cluster.describeKeyspace()

  private void testIfTheEmbeddedCassandraServerIsUpOnHost(String hostAndPort) {
        Random random = new Random();
    Cluster cluster = HFactory.getOrCreateCluster("TestCluster" + random.nextInt(), new CassandraHostConfigurator(hostAndPort));
    assertThat(cluster.getConnectionManager().getActivePools().size(), is(1));
    KeyspaceDefinition keyspaceDefinition = cluster.describeKeyspace("system");
    assertThat(keyspaceDefinition, notNullValue());
    assertThat(keyspaceDefinition.getReplicationFactor(), is(1));
  }

}
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.