Examples of describeKeyspace()


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

    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

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

    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

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

    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

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

    dataLoader.load(MockDataSetHelper.getMockDataSetWithDefaultValues());

    /* test */
    Cluster cluster = HFactory.getOrCreateCluster(clusterName, host);
    assertThat(cluster.describeKeyspace("beautifulKeyspaceName"), notNullValue());
    assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getReplicationFactor(), is(1));
    assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getStrategyClass(),
        is("org.apache.cassandra.locator.SimpleStrategy"));

  }
View Full Code Here

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

    dataLoader.load(MockDataSetHelper.getMockDataSetWithDefaultValues());

    /* test */
    Cluster cluster = HFactory.getOrCreateCluster(clusterName, host);
    assertThat(cluster.describeKeyspace("beautifulKeyspaceName"), notNullValue());
    assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getReplicationFactor(), is(1));
    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);
    assertThat(cluster.describeKeyspace("beautifulKeyspaceName"), notNullValue());
    assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getReplicationFactor(), is(1));
    assertThat(cluster.describeKeyspace("beautifulKeyspaceName").getStrategyClass(),
        is("org.apache.cassandra.locator.SimpleStrategy"));

  }

  @Test
View Full Code Here

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

    dataLoader.load(MockDataSetHelper.getMockDataSetWithSchemaAndDefaultColumnValueValidator());

    /* test */
    Cluster cluster = HFactory.getOrCreateCluster(clusterName, host);
    assertThat(cluster.describeKeyspace("keyspace"), notNullValue());
    assertThat(cluster.describeKeyspace("keyspace").getCfDefs().get(0).getName(), is("columnFamily"));
    assertThat(cluster.describeKeyspace("keyspace").getCfDefs().get(0).getDefaultValidationClass(),
        is(ComparatorType.LONGTYPE.getClassName()));
  }

View Full Code Here

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

    dataLoader.load(MockDataSetHelper.getMockDataSetWithSchemaAndDefaultColumnValueValidator());

    /* test */
    Cluster cluster = HFactory.getOrCreateCluster(clusterName, host);
    assertThat(cluster.describeKeyspace("keyspace"), notNullValue());
    assertThat(cluster.describeKeyspace("keyspace").getCfDefs().get(0).getName(), is("columnFamily"));
    assertThat(cluster.describeKeyspace("keyspace").getCfDefs().get(0).getDefaultValidationClass(),
        is(ComparatorType.LONGTYPE.getClassName()));
  }

  @Test
View Full Code Here

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

    /* test */
    Cluster cluster = HFactory.getOrCreateCluster(clusterName, host);
    assertThat(cluster.describeKeyspace("keyspace"), notNullValue());
    assertThat(cluster.describeKeyspace("keyspace").getCfDefs().get(0).getName(), is("columnFamily"));
    assertThat(cluster.describeKeyspace("keyspace").getCfDefs().get(0).getDefaultValidationClass(),
        is(ComparatorType.LONGTYPE.getClassName()));
  }

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

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

    dataLoader.load(MockDataSetHelper.getMockDataSetWithDefinedValues());

    /* test */
    Cluster cluster = HFactory.getOrCreateCluster(clusterName, host);
    String keyspaceName = "otherKeyspaceName";
    assertThat(cluster.describeKeyspace(keyspaceName), notNullValue());
        List<ColumnFamilyDefinition> columnFamilyDefinitions = cluster.describeKeyspace(keyspaceName).getCfDefs();
        assertThat(columnFamilyDefinitions, notNullValue());
    assertThat(columnFamilyDefinitions.size(), is(5));

        Map<String,ColumnFamilyDefinition> columnFamilyDefinitionsMap = Maps.uniqueIndex(columnFamilyDefinitions, new Function<ColumnFamilyDefinition, String>() {
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.