Search in sources :

Example 21 with ZookeeperDiscoverySpi

use of org.apache.ignite.spi.discovery.zk.ZookeeperDiscoverySpi in project ignite by apache.

the class ZookeeperNodeStart method main.

/**
 */
public static void main(String[] args) throws Exception {
    try {
        IgniteConfiguration cfg = new IgniteConfiguration();
        ZookeeperDiscoverySpi spi = new ZookeeperDiscoverySpi();
        spi.setZkConnectionString("localhost:2181");
        cfg.setDiscoverySpi(spi);
        Ignition.start(cfg);
    } catch (Throwable e) {
        e.printStackTrace(System.out);
        System.exit(1);
    }
}
Also used : IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) ZookeeperDiscoverySpi(org.apache.ignite.spi.discovery.zk.ZookeeperDiscoverySpi)

Aggregations

ZookeeperDiscoverySpi (org.apache.ignite.spi.discovery.zk.ZookeeperDiscoverySpi)21 IgniteSpiException (org.apache.ignite.spi.IgniteSpiException)13 ClusterTopologyCheckedException (org.apache.ignite.internal.cluster.ClusterTopologyCheckedException)12 Test (org.junit.Test)10 Ignite (org.apache.ignite.Ignite)9 UUID (java.util.UUID)5 CountDownLatch (java.util.concurrent.CountDownLatch)5 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)4 ArrayList (java.util.ArrayList)3 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)3 ZkTestClientCnxnSocketNIO (org.apache.zookeeper.ZkTestClientCnxnSocketNIO)3 HashMap (java.util.HashMap)2 ThreadLocalRandom (java.util.concurrent.ThreadLocalRandom)2 ClusterNode (org.apache.ignite.cluster.ClusterNode)2 CacheConfiguration (org.apache.ignite.configuration.CacheConfiguration)2 DiscoveryEvent (org.apache.ignite.events.DiscoveryEvent)2 Event (org.apache.ignite.events.Event)2 GridAbsPredicate (org.apache.ignite.internal.util.lang.GridAbsPredicate)2 IgnitePredicate (org.apache.ignite.lang.IgnitePredicate)2 BitSet (java.util.BitSet)1