Examples of dropKeyspace()


Examples of com.pardot.rhombus.helpers.ConnectionManagerTester.dropKeyspace()

  public void testKeyspaceCreatedFromDefinitionIfNotExists() throws Exception {
    // Set up a connection manager
    ConnectionManagerTester cm = getConnectionManager();

    // Manually drop our Rhombus keyspace
    cm.dropKeyspace(cm.getRhombusKeyspaceName());

    // Manually drop the functional keyspace if it exists
    CKeyspaceDefinition definition = JsonUtil.objectFromJsonResource(CKeyspaceDefinition.class
        , this.getClass().getClassLoader(), "CKeyspaceTestData.js");
    cm.dropKeyspace(definition.getName());
View Full Code Here

Examples of com.pardot.rhombus.helpers.ConnectionManagerTester.dropKeyspace()

    cm.dropKeyspace(cm.getRhombusKeyspaceName());

    // Manually drop the functional keyspace if it exists
    CKeyspaceDefinition definition = JsonUtil.objectFromJsonResource(CKeyspaceDefinition.class
        , this.getClass().getClassLoader(), "CKeyspaceTestData.js");
    cm.dropKeyspace(definition.getName());

    // Try to get an object mapper for the functional keyspace
    cm.getObjectMapper(definition);
    assertNotNull(definition);
View Full Code Here

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

    public boolean deleteKeyspace(String keyspaceName) throws CassandraServerManagementException {

        validateKeyspace(keyspaceName);
        try {
            Cluster cluster = getCluster(null);
            cluster.dropKeyspace(keyspaceName.trim());
        } catch (HectorException e) {
            throw new CassandraServerManagementException("Error removing a keyspace with the name :" + keyspaceName, e, log);
        }
        return true;
    }
View Full Code Here

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

                StrategyModel.SIMPLE_STRATEGY.value(),
                1,
                columnFamilyDefinitions);

        if (cluster.describeKeyspace(keyspaceName) != null) {
            cluster.dropKeyspace(keyspaceName, true);
        }
        cluster.addKeyspace(keyspaceDefinition, true);
        return HFactory.createKeyspace(keyspaceName, cluster);
    }
View Full Code Here

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

       
        Cluster cluster = HFactory.getOrCreateCluster("TestCluster", "localhost:9160");
               
        try {
            if ( cluster.describeKeyspace(DYN_KEYSPACE) != null ) {
              cluster.dropKeyspace(DYN_KEYSPACE);
            }
           
            BasicColumnDefinition columnDefinition = new BasicColumnDefinition();
            columnDefinition.setName(stringSerializer.toByteBuffer("birthdate"));
            columnDefinition.setIndexName("birthdate_idx");
View Full Code Here

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

            String keyspaceName = keyspaceDefinition.getName();

            if (!INTERNAL_CASSANDRA_KEYSPACE.equals(keyspaceName)
                    && !INTERNAL_CASSANDRA_AUTH_KEYSPACE.equals(keyspaceName)
                    && !INTERNAL_CASSANDRA_TRACES_KEYSPACE.equals(keyspaceName)) {
                cluster.dropKeyspace(keyspaceName);
            }
        }
    }

    private static void rmdir(String dir) throws IOException {
View Full Code Here

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

            String keyspaceName = keyspaceDefinition.getName();

            if (!INTERNAL_CASSANDRA_KEYSPACE.equals(keyspaceName)
                    && !INTERNAL_CASSANDRA_AUTH_KEYSPACE.equals(keyspaceName)
                    && !INTERNAL_CASSANDRA_TRACES_KEYSPACE.equals(keyspaceName)) {
                cluster.dropKeyspace(keyspaceName);
            }
        }
    }

    private static void rmdir(String dir) throws IOException {
View Full Code Here

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

                StrategyModel.SIMPLE_STRATEGY.value(),
                1,
                columnFamilyDefinitions);

        if (cluster.describeKeyspace(keyspaceName) != null) {
            cluster.dropKeyspace(keyspaceName, true);
        }
        cluster.addKeyspace(keyspaceDefinition, true);
        keyspace = HFactory.createKeyspace(keyspaceName, cluster);
        Mutator<String> mutator = HFactory.createMutator(keyspace, StringSerializer.get());
View Full Code Here

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

                StrategyModel.SIMPLE_STRATEGY.value(),
                1,
                columnFamilyDefinitions);

        if (cluster.describeKeyspace(keyspaceName) != null) {
            cluster.dropKeyspace(keyspaceName, true);
        }
        cluster.addKeyspace(keyspaceDefinition, true);
        keyspace = HFactory.createKeyspace(keyspaceName, cluster);
        Mutator<String> mutator = HFactory.createMutator(keyspace, StringSerializer.get());
View Full Code Here

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

                StrategyModel.SIMPLE_STRATEGY.value(),
                1,
                columnFamilyDefinitions);

        if (cluster.describeKeyspace(keyspaceName) != null) {
            cluster.dropKeyspace(keyspaceName, true);
        }
        cluster.addKeyspace(keyspaceDefinition, true);
        keyspace = HFactory.createKeyspace(keyspaceName, cluster);
        Mutator<String> mutator = HFactory.createMutator(keyspace, StringSerializer.get());
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.