Search in sources :

Example 6 with DatastaxCassandraService

use of com.metabroadcast.common.persistence.cassandra.DatastaxCassandraService in project atlas-deer by atlasapi.

the class CassandraScheduleStoreIT method setup.

@BeforeClass
public static void setup() throws ConnectionException, IOException {
    context.start();
    cassandraService = new DatastaxCassandraService(seeds, 8, 2);
    cassandraService.startAsync().awaitRunning();
    session = cassandraService.getCluster().connect();
    CassandraInit.createTables(session, context);
    CassandraInit.truncate(session, context);
    session = cassandraService.getCluster().connect(keyspace);
}
Also used : DatastaxCassandraService(com.metabroadcast.common.persistence.cassandra.DatastaxCassandraService)

Example 7 with DatastaxCassandraService

use of com.metabroadcast.common.persistence.cassandra.DatastaxCassandraService in project atlas-deer by atlasapi.

the class DatastaxCassandraOrganizationStoreTest method init.

@BeforeClass
public static void init() throws Exception {
    // Thrift init
    context.start();
    CassandraHelper.createKeyspace(context);
    // CQL init
    DatastaxCassandraService cassandraService = new DatastaxCassandraService(seeds, 8, 2);
    cassandraService.startAsync().awaitRunning();
    session = cassandraService.getCluster().connect(keyspace);
    session.execute(IOUtils.toString(DatastaxCassandraOrganizationStoreTest.class.getResourceAsStream("/atlas_organisation.schema")));
    session.execute(IOUtils.toString(DatastaxCassandraOrganizationStoreTest.class.getResourceAsStream("/atlas_organisation_uri.schema")));
}
Also used : DatastaxCassandraService(com.metabroadcast.common.persistence.cassandra.DatastaxCassandraService) BeforeClass(org.junit.BeforeClass)

Example 8 with DatastaxCassandraService

use of com.metabroadcast.common.persistence.cassandra.DatastaxCassandraService in project atlas-deer by atlasapi.

the class IdSettingOrganisationStoreIT method init.

@BeforeClass
public static void init() throws Exception {
    // Thrift init
    context.start();
    CassandraHelper.createKeyspace(context);
    // CQL init
    DatastaxCassandraService cassandraService = new DatastaxCassandraService(seeds, 8, 2);
    cassandraService.startAsync().awaitRunning();
    session = cassandraService.getCluster().connect(keyspace);
    session.execute(IOUtils.toString(DatastaxCassandraOrganizationStoreTest.class.getResourceAsStream("/atlas_organisation.schema")));
    session.execute(IOUtils.toString(DatastaxCassandraOrganizationStoreTest.class.getResourceAsStream("/atlas_organisation_uri.schema")));
}
Also used : DatastaxCassandraService(com.metabroadcast.common.persistence.cassandra.DatastaxCassandraService) BeforeClass(org.junit.BeforeClass)

Aggregations

DatastaxCassandraService (com.metabroadcast.common.persistence.cassandra.DatastaxCassandraService)8 BeforeClass (org.junit.BeforeClass)6 Cluster (com.datastax.driver.core.Cluster)2 CodecRegistry (com.datastax.driver.core.CodecRegistry)1 Session (com.datastax.driver.core.Session)1 JacksonJsonCodec (com.datastax.driver.extras.codecs.json.JacksonJsonCodec)1 Keyspace (com.netflix.astyanax.Keyspace)1 ConsoleAppender (org.apache.log4j.ConsoleAppender)1 PatternLayout (org.apache.log4j.PatternLayout)1 Bean (org.springframework.context.annotation.Bean)1