Package org.lilyproject.solrtestfw

Examples of org.lilyproject.solrtestfw.SolrProxy


        if (this.mode == Mode.CONNECT) {
            // we'll do the reset through the special JMX call
            hbaseProxy.setCleanStateOnConnect(false);
        }
        hbaseProxy.setEnableMapReduce(true);
        solrProxy = new SolrProxy(solrMode, this.clearData, enableSolrCloud);
        lilyServerProxy = new LilyServerProxy(lilyServerMode, this.clearData, hbaseProxy);
        hbaseIndexerLauncherService = new HbaseIndexerLauncherService();
    }
View Full Code Here


import org.lilyproject.solrtestfw.SolrProxy;

public class SolrProxyTest {
    @Test
    public void testDynamicallyChangingNumberOfCores() throws Exception {
        SolrProxy solr = new SolrProxy();
        solr.start();

        testSolrCore("core0", 200);
        testSolrCore("core1", 404);

        // Increase number of cores
        solr.changeSolrDefinition(new SolrDefinition(
                SolrDefinition.core("core0"),
                SolrDefinition.core("core1")
        ));

        testSolrCore("core0", 200);
        testSolrCore("core1", 200);
        testSolrCore("core2", 404);

        // Reduce number of cores
        solr.changeSolrDefinition(new SolrDefinition(
                SolrDefinition.core("core0")
        ));

        testSolrCore("core0", 200);
        testSolrCore("core1", 404);

        // Increase number of cores again
        solr.changeSolrDefinition(new SolrDefinition(
                SolrDefinition.core("core0"),
                SolrDefinition.core("core1"),
                SolrDefinition.core("core2")
        ));

        testSolrCore("core0", 200);
        testSolrCore("core1", 200);
        testSolrCore("core2", 200);
        testSolrCore("core3", 404);

        solr.stop();
    }
View Full Code Here

        solr.stop();
    }

    @Test
    public void testNoCore0() throws Exception {
        SolrProxy solr = new SolrProxy();
        solr.start();

        solr.changeSolrDefinition(new SolrDefinition(
                SolrDefinition.core("first"),
                SolrDefinition.core("second")
        ));

        // Even when not specified, there is always the core0 core
        testSolrCore("core0", 200);
        testSolrCore("first", 200);
        testSolrCore("second", 200);

        solr.stop();
    }
View Full Code Here

TOP

Related Classes of org.lilyproject.solrtestfw.SolrProxy

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.