| // Licensed to the Apache Software Foundation (ASF) under one or more |
| // contributor license agreements. See the NOTICE file distributed with |
| // this work for additional information regarding copyright ownership. |
| // The ASF licenses this file to You under the Apache License, Version 2.0 |
| // (the "License"); you may not use this file except in compliance with |
| // the License. You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| = ZooKeeper IP Finder Extension |
| |
| :javaFile: {javaCodeDir}/TcpIpDiscovery.java |
| |
| NOTE: Not supported in .NET/C#. |
| |
| Apache Ignite ZooKeeper Ip Finder module provides a TCP Discovery IP Finder that uses a ZooKeeper |
| directory to locate other Ignite nodes to connect to. |
| |
| == Install |
| |
| Depending on how you use Ignite, you can an extension using one of the following methods: |
| |
| - If you use the binary distribution, move the `ignite-zookeeper-ip-finder-ext` to the `lib` directory before starting the node. |
| - Add libraries from `ignite-zookeeper-ip-finder-ext` to the classpath of your application. |
| - Add a module as a Maven dependency to your project. |
| |
| == Configuration |
| |
| To set up ZooKeeper IP finder use `TcpDiscoveryZookeeperIpFinder`: |
| |
| [tabs] |
| -- |
| tab:XML[] |
| [source,xml] |
| ---- |
| <bean class="org.apache.ignite.configuration.IgniteConfiguration"> |
| <property name="discoverySpi"> |
| <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi"> |
| <property name="ipFinder"> |
| <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.zk.TcpDiscoveryZookeeperIpFinder"> |
| <property name="zkConnectionString" value="127.0.0.1:2181"/> |
| </bean> |
| </property> |
| </bean> |
| </property> |
| </bean> |
| ---- |
| tab:Java[] |
| [source,java] |
| ---- |
| include::{javaFile}[tag=zk,indent=0] |
| ---- |
| tab:C#/.NET[unsupported] |
| tab:C++[unsupported] |
| -- |
| |
| The module depends on third-party libraries that use the slf4j facade for logging. |
| You can set up an underlying logging framework yourself. |