Examples of EmbeddedCassandraService


Examples of org.apache.cassandra.service.EmbeddedCassandraService

     * @throws IOException - when reading config file
     * @throws ConfigurationException - when can set up configuration
     */
    private void setup() throws TTransportException, IOException, ConfigurationException
    {
        EmbeddedCassandraService cassandra;

        cassandra = new EmbeddedCassandraService();
        cassandra.init();

        // spawn cassandra in a new thread
        Thread t = new Thread(cassandra);
        t.setDaemon(true);
        t.start();
View Full Code Here

Examples of org.apache.cassandra.service.EmbeddedCassandraService

     * @throws IOException - when reading config file
     * @throws ConfigurationException - when can set up configuration
     */
    private void setup() throws TTransportException, IOException, ConfigurationException
    {
        EmbeddedCassandraService cassandra;

        cassandra = new EmbeddedCassandraService();
        cassandra.init();

        // spawn cassandra in a new thread
        Thread t = new Thread(cassandra);
        t.setDaemon(true);
        t.start();
View Full Code Here

Examples of org.apache.cassandra.service.EmbeddedCassandraService

    };
  
    @Test
    public void testCli() throws IOException, TException, ConfigurationException, ClassNotFoundException, TimedOutException, NotFoundException, SchemaDisagreementException, NoSuchFieldException, InvalidRequestException, UnavailableException, InstantiationException, IllegalAccessException
    {
        new EmbeddedCassandraService().start();

        // new error/output streams for CliSessionState
        ByteArrayOutputStream errStream = new ByteArrayOutputStream();
        ByteArrayOutputStream outStream = new ByteArrayOutputStream();
View Full Code Here

Examples of org.apache.cassandra.service.EmbeddedCassandraService

   
    private static void initCleaner() throws IOException, TTransportException, ConfigurationException {
        cleaner = new CassandraServiceDataCleaner();
        cleaner.prepare();
       
        cassandra = new EmbeddedCassandraService();
        cassandra.start();
    }
View Full Code Here

Examples of org.apache.cassandra.service.EmbeddedCassandraService

    };
  
    @Test
    public void testCli() throws IOException, TTransportException, ConfigurationException
    {
        new EmbeddedCassandraService().start();

        // new error/output streams for CliSessionState
        ByteArrayOutputStream errStream = new ByteArrayOutputStream();
        ByteArrayOutputStream outStream = new ByteArrayOutputStream();
View Full Code Here

Examples of org.apache.cassandra.service.EmbeddedCassandraService

        // Use the test configuration file.
        System.setProperty("storage-config", "../../test/conf");

        CassandraServiceDataCleaner cleaner = new CassandraServiceDataCleaner();
        cleaner.prepare();
        cassandra = new EmbeddedCassandraService();
        cassandra.init();
        Thread t = new Thread(cassandra);
        t.setDaemon(true);
        t.start();
    }
View Full Code Here

Examples of org.apache.cassandra.service.EmbeddedCassandraService

{
    @BeforeClass
    public static void setup() throws Exception
    {
        Schema.instance.clear();
        EmbeddedCassandraService cassandra = new EmbeddedCassandraService();
        cassandra.start();
    }
View Full Code Here

Examples of org.apache.cassandra.service.EmbeddedCassandraService

    @BeforeClass
    public static void defineSchema() throws ConfigurationException, IOException, TException
    {
        SchemaLoader.prepareServer();
        new EmbeddedCassandraService().start();
        ThriftSessionManager.instance.setCurrentSocket(new InetSocketAddress(9160));
        SchemaLoader.createKeyspace(KEYSPACE1,
                                    SimpleStrategy.class,
                                    KSMetaData.optsWithRF(1),
                                    SchemaLoader.standardCFMD(KEYSPACE1, CF_STANDARD));
View Full Code Here

Examples of org.apache.cassandra.service.EmbeddedCassandraService

    @BeforeClass
    public static void setup() throws Exception
    {
        Schema.instance.clear();

        EmbeddedCassandraService cassandra = new EmbeddedCassandraService();
        cassandra.start();

        // Currently the native server start method return before the server is fully binded to the socket, so we need
        // to wait slightly before trying to connect to it. We should fix this but in the meantime using a sleep.
        Thread.sleep(500);
View Full Code Here

Examples of org.apache.cassandra.service.EmbeddedCassandraService

    }

    protected static void startCassandra() throws IOException
    {
        Schema.instance.clear(); // Schema are now written on disk and will be reloaded
        cassandra = new EmbeddedCassandraService();
        cassandra.start();
    }
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.