Package org.apache.cassandra.service

Examples of org.apache.cassandra.service.EmbeddedCassandraService


    @Test
    public void testCli() throws IOException, TException, TimedOutException, NotFoundException, SchemaDisagreementException, NoSuchFieldException, InvalidRequestException, UnavailableException, InstantiationException, IllegalAccessException
    {
        Schema.instance.clear(); // Schema are now written on disk and will be reloaded
        new EmbeddedCassandraService().start();

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


    private static PreparedStatement noncounter;

    @BeforeClass()
    public static void setup() throws ConfigurationException, IOException
    {
        cassandra = new EmbeddedCassandraService();
        cassandra.start();

        cluster = Cluster.builder().addContactPoint("127.0.0.1").withPort(DatabaseDescriptor.getNativeTransportPort()).build();
        session = cluster.connect();
View Full Code Here

    @BeforeClass()
    public static void setup() throws ConfigurationException, IOException
    {
        Schema.instance.clear();

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

        cluster = Cluster.builder().addContactPoint("127.0.0.1").withPort(DatabaseDescriptor.getNativeTransportPort()).build();
        session = cluster.connect();
View Full Code Here

   
    @BeforeClass
    public static void setup() throws IOException, TException
    {
        Schema.instance.clear(); // Schema are now written on disk and will be reloaded
        new EmbeddedCassandraService().start();
        ThriftSessionManager.instance.setCurrentSocket(new InetSocketAddress(9160));       
        server = new CassandraServer();
        server.set_keyspace("Keyspace1");
    }
View Full Code Here

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

        if (cleanCassandra) {
            clean();
        }

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

        if (cassandraStartupCommands != null) {
            executeCommands();
        }
    }
View Full Code Here

    };
  
    @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

    };
  
    @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

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

    @BeforeClass
    public static void setUpClass() throws Exception {
        FileUtil.delete("target/cassandra");
        try {
            System.setProperty("cassandra.config", "cassandra/cassandra.yaml");
            EmbeddedCassandraService cassandra = new EmbeddedCassandraService();
            cassandra.start();
        } catch (Exception e) {
            // catch any exception here, because otherwise the test rule would not get a chance to execute
            exceptionDuringCassandraStart = e;
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.cassandra.service.EmbeddedCassandraService

Copyright © 2018 www.massapicom. 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.