Discovery/Jgroups: Upgrade to 2.9.0. Closes #7.

This commit is contained in:
kimchy 2010-02-12 18:09:14 +02:00
parent 8f1023cbbe
commit 78eaacccef
7 changed files with 36 additions and 34 deletions

View File

@ -1,11 +1,9 @@
<component name="libraryTable"> <component name="libraryTable">
<library name="jgroups"> <library name="jgroups">
<CLASSES> <CLASSES>
<root url="jar://$GRADLE_REPOSITORY$/jgroups/jgroups/jars/jgroups-2.8.0.GA.jar!/" /> <root url="jar://$GRADLE_REPOSITORY$/jgroups/jgroups/jars/jgroups-2.9.0.GA.jar!/" />
</CLASSES> </CLASSES>
<JAVADOC /> <JAVADOC />
<SOURCES> <SOURCES />
<root url="file://$PROJECT_DIR$/../../../opt/jgroups/2.8.0.GA.src/src" />
</SOURCES>
</library> </library>
</component> </component>

View File

@ -50,7 +50,7 @@ dependencies {
compile 'org.apache.lucene:lucene-analyzers:3.0.0' compile 'org.apache.lucene:lucene-analyzers:3.0.0'
compile 'org.apache.lucene:lucene-queries:3.0.0' compile 'org.apache.lucene:lucene-queries:3.0.0'
compile('jgroups:jgroups:2.8.0.GA') { transitive = false } compile('jgroups:jgroups:2.9.0.GA') { transitive = false }
compile('org.jboss.netty:netty:3.1.5.GA') { transitive = false } compile('org.jboss.netty:netty:3.1.5.GA') { transitive = false }
testCompile project(':test-testng') testCompile project(':test-testng')

View File

@ -7,6 +7,8 @@
multicasting cannot be used in a network, e.g. because it is disabled (routers discard multicast). multicasting cannot be used in a network, e.g. because it is disabled (routers discard multicast).
Note that TCP.bind_addr and TCPPING.initial_hosts should be set, possibly via system properties, e.g. Note that TCP.bind_addr and TCPPING.initial_hosts should be set, possibly via system properties, e.g.
-Djgroups.bind_addr=192.168.5.2 and -Djgroups.tcpping.initial_hosts=192.168.5.2[7800]". -Djgroups.bind_addr=192.168.5.2 and -Djgroups.tcpping.initial_hosts=192.168.5.2[7800]".
author: Bela Ban
version: $Id: tcp-nio.xml,v 1.19 2009/12/11 10:45:19 belaban Exp $
--> -->
<config xmlns="urn:org:jgroups" <config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@ -22,7 +24,6 @@
enable_bundling="true" enable_bundling="true"
use_send_queues="true" use_send_queues="true"
sock_conn_timeout="300" sock_conn_timeout="300"
skip_suspected_members="true"
thread_pool.enabled="true" thread_pool.enabled="true"
thread_pool.min_threads="1" thread_pool.min_threads="1"

View File

@ -7,22 +7,23 @@
multicasting cannot be used in a network, e.g. because it is disabled (routers discard multicast). multicasting cannot be used in a network, e.g. because it is disabled (routers discard multicast).
Note that TCP.bind_addr and TCPPING.initial_hosts should be set, possibly via system properties, e.g. Note that TCP.bind_addr and TCPPING.initial_hosts should be set, possibly via system properties, e.g.
-Djgroups.bind_addr=192.168.5.2 and -Djgroups.tcpping.initial_hosts=192.168.5.2[7800] -Djgroups.bind_addr=192.168.5.2 and -Djgroups.tcpping.initial_hosts=192.168.5.2[7800]
author: Bela Ban
version: $Id: tcp.xml,v 1.40 2009/12/18 09:28:30 belaban Exp $
--> -->
<config xmlns="urn:org:jgroups" <config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-2.8.xsd"> xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-2.8.xsd">
<TCP bind_port="7800" <TCP bind_port="7800"
loopback="true" loopback="true"
recv_buf_size="${tcp.recv_buf_size:20000000}" recv_buf_size="${tcp.recv_buf_size:20M}"
send_buf_size="${tcp.send_buf_size:640000}" send_buf_size="${tcp.send_buf_size:640K}"
discard_incompatible_packets="true" discard_incompatible_packets="true"
max_bundle_size="64000" max_bundle_size="64K"
max_bundle_timeout="30" max_bundle_timeout="30"
enable_bundling="true" enable_bundling="true"
use_send_queues="true" use_send_queues="true"
sock_conn_timeout="300" sock_conn_timeout="300"
skip_suspected_members="true" timer.num_threads="4"
num_timer_threads="4"
thread_pool.enabled="true" thread_pool.enabled="true"
thread_pool.min_threads="1" thread_pool.min_threads="1"
@ -56,13 +57,13 @@
discard_delivered_msgs="true"/> discard_delivered_msgs="true"/>
<UNICAST timeout="300,600,1200"/> <UNICAST timeout="300,600,1200"/>
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
max_bytes="400000"/> max_bytes="400K"/>
<pbcast.GMS print_local_addr="false" join_timeout="3000" <pbcast.GMS print_local_addr="false" join_timeout="3000"
view_bundling="true"/> view_bundling="true"/>
<FC max_credits="2000000" <FC max_credits="2M"
min_threshold="0.10"/> min_threshold="0.10"/>
<FRAG2 frag_size="60000"/> <FRAG2 frag_size="60K"/>
<!--<pbcast.STREAMING_STATE_TRANSFER/>--> <!--<pbcast.STREAMING_STATE_TRANSFER/>-->
<!-- <pbcast.STATE_TRANSFER/> --> <!-- <pbcast.STATE_TRANSFER/> -->
</config> </config>

View File

@ -1,3 +1,6 @@
<!-- Changes from default jgroups tcp.xml: -->
<!-- 1. Changed print_local_addr from true to false -->
<!-- ************ JGroups Protocol Stack Configuration ************** --> <!-- ************ JGroups Protocol Stack Configuration ************** -->
<!-- generated by XmlConfigurator on Mon Apr 26 11:26:18 PDT 2004 --> <!-- generated by XmlConfigurator on Mon Apr 26 11:26:18 PDT 2004 -->
<!-- input file: tcpgossip.old.xml --> <!-- input file: tcpgossip.old.xml -->
@ -6,7 +9,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-2.8.xsd"> xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-2.8.xsd">
<TCP bind_port="7800" bind_addr="localhost" loopback="true"/> <TCP bind_port="7800" bind_addr="localhost" loopback="true"/>
<TCPGOSSIP timeout="3000" initial_hosts="localhost[12000]" num_initial_members="3"/> <TCPGOSSIP timeout="3000" initial_hosts="localhost[12001]" num_initial_members="3"/>
<MERGE2 max_interval="30000" <MERGE2 max_interval="30000"
min_interval="10000"/> min_interval="10000"/>
<FD timeout="2000" max_tries="4"/> <FD timeout="2000" max_tries="4"/>
@ -14,7 +17,7 @@
<pbcast.NAKACK gc_lag="100" retransmit_timeout="600,1200,2400,4800"/> <pbcast.NAKACK gc_lag="100" retransmit_timeout="600,1200,2400,4800"/>
<UNICAST timeout="300,600,1200"/> <UNICAST timeout="300,600,1200"/>
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="20000" max_bytes="0"/> <pbcast.STABLE stability_delay="1000" desired_avg_gossip="20000" max_bytes="0"/>
<pbcast.GMS print_local_addr="true" join_timeout="5000"/> <pbcast.GMS print_local_addr="false" join_timeout="5000"/>
<FC max_credits="2000000" <FC max_credits="2000000"
min_threshold="0.10"/> min_threshold="0.10"/>
<FRAG2 frag_size="60000"/> <FRAG2 frag_size="60000"/>

View File

@ -1,30 +1,33 @@
<!-- Changes from default jgroups udp.xml: --> <!-- Changes from default jgroups udp.xml: -->
<!-- 1. Changed print_local_addr from true to false --> <!-- 1. Changed print_local_addr from true to false -->
<!-- 2. Disabled STREAMING_STATE_TRANSFER, we don't use it --> <!-- 2. Disabled STATE_TRANSFER, we don't use it -->
<!-- <!--
Default stack using IP multicasting. It is similar to the "udp" Default stack using IP multicasting. It is similar to the "udp"
stack in stacks.xml, but doesn't use streaming state transfer and flushing stack in stacks.xml, but doesn't use streaming state transfer and flushing
author: Bela Ban
version: $Id: udp.xml,v 1.40 2010/02/08 07:11:15 belaban Exp $
--> -->
<config xmlns="urn:org:jgroups" <config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-2.8.xsd"> xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-2.8.xsd">
<UDP <UDP
mcast_port="${jgroups.udp.mcast_port:45588}" mcast_port="${jgroups.udp.mcast_port:45588}"
tos="8" tos="8"
ucast_recv_buf_size="20000000" ucast_recv_buf_size="20M"
ucast_send_buf_size="640000" ucast_send_buf_size="640K"
mcast_recv_buf_size="25000000" mcast_recv_buf_size="25M"
mcast_send_buf_size="640000" mcast_send_buf_size="640K"
loopback="false" loopback="true"
discard_incompatible_packets="true" discard_incompatible_packets="true"
max_bundle_size="64000" max_bundle_size="64K"
max_bundle_timeout="30" max_bundle_timeout="30"
ip_ttl="${jgroups.udp.ip_ttl:2}" ip_ttl="${jgroups.udp.ip_ttl:2}"
enable_bundling="true" enable_bundling="true"
enable_diagnostics="true" enable_diagnostics="true"
thread_naming_pattern="cl" thread_naming_pattern="cl"
num_timer_threads="4" timer.num_threads="4"
thread_pool.enabled="true" thread_pool.enabled="true"
thread_pool.min_threads="2" thread_pool.min_threads="2"
@ -57,14 +60,14 @@
discard_delivered_msgs="true"/> discard_delivered_msgs="true"/>
<UNICAST timeout="300,600,1200"/> <UNICAST timeout="300,600,1200"/>
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000" <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
max_bytes="1000000"/> max_bytes="1M"/>
<pbcast.GMS print_local_addr="false" join_timeout="3000" <pbcast.GMS print_local_addr="false" join_timeout="3000"
view_bundling="true"/> view_bundling="true"/>
<FC max_credits="500000" <FC max_credits="500K"
min_threshold="0.20"/> min_threshold="0.20"/>
<FRAG2 frag_size="60000"/> <FRAG2 frag_size="60K"/>
<!--pbcast.STREAMING_STATE_TRANSFER /--> <!--pbcast.STREAMING_STATE_TRANSFER /-->
<!--<pbcast.STATE_TRANSFER/>--> <!--<pbcast.STATE_TRANSFER />-->
<!-- pbcast.FLUSH /--> <!-- pbcast.FLUSH /-->
</config> </config>

View File

@ -29,7 +29,6 @@ import org.elasticsearch.discovery.Discovery;
import org.elasticsearch.discovery.DiscoveryException; import org.elasticsearch.discovery.DiscoveryException;
import org.elasticsearch.discovery.InitialStateDiscoveryListener; import org.elasticsearch.discovery.InitialStateDiscoveryListener;
import org.elasticsearch.env.Environment; import org.elasticsearch.env.Environment;
import org.elasticsearch.threadpool.ThreadPool;
import org.elasticsearch.transport.TransportService; import org.elasticsearch.transport.TransportService;
import org.elasticsearch.util.component.AbstractComponent; import org.elasticsearch.util.component.AbstractComponent;
import org.elasticsearch.util.component.Lifecycle; import org.elasticsearch.util.component.Lifecycle;
@ -66,8 +65,6 @@ public class JgroupsDiscovery extends AbstractComponent implements Discovery, Re
private final ClusterName clusterName; private final ClusterName clusterName;
private final ThreadPool threadPool;
private final TransportService transportService; private final TransportService transportService;
private final ClusterService clusterService; private final ClusterService clusterService;
@ -85,10 +82,9 @@ public class JgroupsDiscovery extends AbstractComponent implements Discovery, Re
private final CopyOnWriteArrayList<InitialStateDiscoveryListener> initialStateListeners = new CopyOnWriteArrayList<InitialStateDiscoveryListener>(); private final CopyOnWriteArrayList<InitialStateDiscoveryListener> initialStateListeners = new CopyOnWriteArrayList<InitialStateDiscoveryListener>();
@Inject public JgroupsDiscovery(Settings settings, Environment environment, ClusterName clusterName, @Inject public JgroupsDiscovery(Settings settings, Environment environment, ClusterName clusterName,
ThreadPool threadPool, TransportService transportService, ClusterService clusterService) { TransportService transportService, ClusterService clusterService) {
super(settings); super(settings);
this.clusterName = clusterName; this.clusterName = clusterName;
this.threadPool = threadPool;
this.transportService = transportService; this.transportService = transportService;
this.clusterService = clusterService; this.clusterService = clusterService;