Package me.prettyprint.hector.api

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


    /* 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

    /* 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

        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

 
  @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

  @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

  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

    String clusterName = "TestCluster2";
    String host = "localhost:9171";
    DataLoader dataLoader = new DataLoader(clusterName, host);
    Cluster cluster = dataLoader.getCluster();
    assertThat(cluster.describeKeyspaces(), notNullValue());
    assertThat(cluster.describeKeyspace("system"), notNullValue());
    assertThat(cluster.describeKeyspace("system").getReplicationFactor(), is(1));
    assertThat(cluster.describeKeyspace("system").getName(), is("system"));
  }

  @Test
View Full Code Here

    String host = "localhost:9171";
    DataLoader dataLoader = new DataLoader(clusterName, host);
    Cluster cluster = dataLoader.getCluster();
    assertThat(cluster.describeKeyspaces(), notNullValue());
    assertThat(cluster.describeKeyspace("system"), notNullValue());
    assertThat(cluster.describeKeyspace("system").getReplicationFactor(), is(1));
    assertThat(cluster.describeKeyspace("system").getName(), is("system"));
  }

  @Test
  public void shouldCreateKeyspaceWithDefaultValues() {
View Full Code Here

    DataLoader dataLoader = new DataLoader(clusterName, host);
    Cluster cluster = dataLoader.getCluster();
    assertThat(cluster.describeKeyspaces(), notNullValue());
    assertThat(cluster.describeKeyspace("system"), notNullValue());
    assertThat(cluster.describeKeyspace("system").getReplicationFactor(), is(1));
    assertThat(cluster.describeKeyspace("system").getName(), is("system"));
  }

  @Test
  public void shouldCreateKeyspaceWithDefaultValues() {
    String clusterName = "TestCluster3";
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.