Examples of ZooKeeperItf


Examples of com.ngdata.sep.util.zookeeper.ZooKeeperItf

        writer.close();
    }

    private Server createServer() throws Exception{
        // create path on zookeeper for solr cloud
        ZooKeeperItf zk = ZkUtil.connect("localhost:" + zkClientPort, 10000);
        ZkUtil.createPath(zk, "/solr");
        zk.close();

        Server server = new Server(solrPort);
        WebAppContext ctx = new WebAppContext(solrWarPath, "/solr");
        // The reason to change the classloading behavior was primarily so that the logging libraries would
        // be inherited, and hence that Solr would use the same logging system & conf.
View Full Code Here

Examples of com.ngdata.sep.util.zookeeper.ZooKeeperItf

        COLLECTION2 = new CloudSolrServer(SOLR_TEST_UTILITY.getZkConnectString());
        COLLECTION2.setDefaultCollection("collection2");
       
        SOLR_ZK = "127.0.0.1:" + zkClientPort + "/solr";
        INDEXER_ZK = "localhost:" + zkClientPort;
        ZooKeeperItf zkItf = ZkUtil.connect(INDEXER_ZK, 15000);
        INDEXER_MODEL = new IndexerModelImpl(zkItf, "/ngdata/hbaseindexer");
        IndexerDefinition indexerDef = new IndexerDefinitionBuilder()
        .name("zkindexerdef")
        .indexerComponentFactory(DefaultIndexerComponentFactory.class.getName())
        .configuration(Resources.toByteArray(Resources.getResource(
View Full Code Here

Examples of com.ngdata.sep.util.zookeeper.ZooKeeperItf

        COLLECTION1 = new CloudSolrServer(SOLR_TEST_UTILITY.getZkConnectString());
        COLLECTION1.setDefaultCollection("collection1");

        SOLR_ZK = "127.0.0.1:" + zkClientPort + "/solr";
        INDEXER_ZK = "localhost:" + zkClientPort;
        ZooKeeperItf zkItf = ZkUtil.connect(INDEXER_ZK, 15000);
        INDEXER_MODEL = new IndexerModelImpl(zkItf, "/ngdata/hbaseindexer");
        IndexerDefinition indexerDef = new IndexerDefinitionBuilder()
                                                .name("zkindexerdef")
                                                .indexerComponentFactory(DefaultIndexerComponentFactory.class.getName())
                                                .configuration(Resources.toByteArray(Resources.getResource(
View Full Code Here

Examples of com.ngdata.sep.util.zookeeper.ZooKeeperItf

        }

        String zkConnectString = options.valueOf(zkOption);

        System.out.println("Connecting to Zookeeper " + zkConnectString + "...");
        ZooKeeperItf zk = ZkUtil.connect(zkConnectString, 30000);
        waitUntilReplicationDone(zk, options.valueOf(hbaseMasterPortOption));

        Closer.close(zk);
    }
View Full Code Here

Examples of com.ngdata.sep.util.zookeeper.ZooKeeperItf

        }
    }

    @Test
    public void testEvents() throws Exception {
        ZooKeeperItf zk1 = ZkUtil.connect("localhost:" + ZK_CLIENT_PORT, 15000);
        ZooKeeperItf zk2 = ZkUtil.connect("localhost:" + ZK_CLIENT_PORT, 15000);
        WriteableIndexerModel model1 = null;
        WriteableIndexerModel model2 = null;
        try {
            TestListener listener = new TestListener();
View Full Code Here

Examples of com.ngdata.sep.util.zookeeper.ZooKeeperItf

        }
    }

    @Test
    public void testLocking() throws Exception {
        ZooKeeperItf zk1 = ZkUtil.connect("localhost:" + ZK_CLIENT_PORT, 15000);
        ZooKeeperItf zk2 = ZkUtil.connect("localhost:" + ZK_CLIENT_PORT, 15000);
        WriteableIndexerModel model1 = null;
        WriteableIndexerModel model2 = null;
        String indexerName = "lock_test_indexer";
        try {
            model1 = new IndexerModelImpl(zk1, "/test");
View Full Code Here

Examples of com.ngdata.sep.util.zookeeper.ZooKeeperItf

        boolean enableJmx = options.has(enableJmxOption);
        String zkConnectString = options.valueOf(zkOption);

        System.out.println("Connecting to Zookeeper " + zkConnectString + "...");
        ZooKeeperItf zk = ZkUtil.connect(zkConnectString, 30000);

        ReplicationStatusRetriever retriever = new ReplicationStatusRetriever(zk, options.valueOf(hbaseMasterPortOption));
        ReplicationStatus replicationStatus = retriever.collectStatusFromZooKeepeer();

        if (enableJmx) {
View Full Code Here

Examples of com.ngdata.sep.util.zookeeper.ZooKeeperItf

public class LoggingConsumer {
    public static void main(String[] args) throws Exception {
        Configuration conf = HBaseConfiguration.create();
        conf.setBoolean("hbase.replication", true);

        ZooKeeperItf zk = ZkUtil.connect("localhost", 20000);
        SepModel sepModel = new SepModelImpl(zk, conf);

        final String subscriptionName = "logger";

        if (!sepModel.hasSubscription(subscriptionName)) {
View Full Code Here

Examples of org.lilyproject.util.zookeeper.ZooKeeperItf

        return conf;
    }

    @Override
    public List<InputSplit> getSplits(JobContext jobContext) throws IOException, InterruptedException {
        ZooKeeperItf zk = null;
        LilyClient lilyClient = null;
        Configuration hbaseConf = null;
        List<InputSplit> inputSplits = Lists.newArrayList();
        try {
            zk = ZkUtil.connect(zkConnectString, 30000);
View Full Code Here

Examples of org.lilyproject.util.zookeeper.ZooKeeperItf

     * @param tableName    name of the repository table to write to
     */
    public static BulkIngester newBulkIngester(String zkConnString, int timeout, String repositoryName, String tableName,
                                               boolean bulkMode) {
        try {
            ZooKeeperItf zk = ZkUtil.connect(zkConnString, timeout);

            // we need a lily client for non bulk access
            LilyClient lilyClient = new LilyClient(zk);

            // we need an HBaseRepository for bulk access
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.