Skip to content

Commit 78eaacc

Browse files
committed
Discovery/Jgroups: Upgrade to 2.9.0. Closes #7.
1 parent 8f1023c commit 78eaacc

File tree

7 files changed

+36
-34
lines changed

7 files changed

+36
-34
lines changed

.idea/libraries/jgroups.xml

+2-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/elasticsearch/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ dependencies {
5050
compile 'org.apache.lucene:lucene-analyzers:3.0.0'
5151
compile 'org.apache.lucene:lucene-queries:3.0.0'
5252

53-
compile('jgroups:jgroups:2.8.0.GA') { transitive = false }
53+
compile('jgroups:jgroups:2.9.0.GA') { transitive = false }
5454
compile('org.jboss.netty:netty:3.1.5.GA') { transitive = false }
5555

5656
testCompile project(':test-testng')

modules/elasticsearch/src/main/java/config/jgroups/tcp-nio.xml

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

2728
thread_pool.enabled="true"
2829
thread_pool.min_threads="1"

modules/elasticsearch/src/main/java/config/jgroups/tcp.xml

+10-9
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,23 @@
77
multicasting cannot be used in a network, e.g. because it is disabled (routers discard multicast).
88
Note that TCP.bind_addr and TCPPING.initial_hosts should be set, possibly via system properties, e.g.
99
-Djgroups.bind_addr=192.168.5.2 and -Djgroups.tcpping.initial_hosts=192.168.5.2[7800]
10+
author: Bela Ban
11+
version: $Id: tcp.xml,v 1.40 2009/12/18 09:28:30 belaban Exp $
1012
-->
1113
<config xmlns="urn:org:jgroups"
1214
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1315
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-2.8.xsd">
1416
<TCP bind_port="7800"
1517
loopback="true"
16-
recv_buf_size="${tcp.recv_buf_size:20000000}"
17-
send_buf_size="${tcp.send_buf_size:640000}"
18+
recv_buf_size="${tcp.recv_buf_size:20M}"
19+
send_buf_size="${tcp.send_buf_size:640K}"
1820
discard_incompatible_packets="true"
19-
max_bundle_size="64000"
21+
max_bundle_size="64K"
2022
max_bundle_timeout="30"
2123
enable_bundling="true"
2224
use_send_queues="true"
2325
sock_conn_timeout="300"
24-
skip_suspected_members="true"
25-
num_timer_threads="4"
26+
timer.num_threads="4"
2627

2728
thread_pool.enabled="true"
2829
thread_pool.min_threads="1"
@@ -56,13 +57,13 @@
5657
discard_delivered_msgs="true"/>
5758
<UNICAST timeout="300,600,1200"/>
5859
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
59-
max_bytes="400000"/>
60+
max_bytes="400K"/>
6061
<pbcast.GMS print_local_addr="false" join_timeout="3000"
6162

6263
view_bundling="true"/>
63-
<FC max_credits="2000000"
64+
<FC max_credits="2M"
6465
min_threshold="0.10"/>
65-
<FRAG2 frag_size="60000"/>
66+
<FRAG2 frag_size="60K"/>
6667
<!--<pbcast.STREAMING_STATE_TRANSFER/>-->
6768
<!-- <pbcast.STATE_TRANSFER/> -->
68-
</config>
69+
</config>

modules/elasticsearch/src/main/java/config/jgroups/tcpgossip.xml

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

modules/elasticsearch/src/main/java/config/jgroups/udp.xml

+15-12
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
11
<!-- Changes from default jgroups udp.xml: -->
22
<!-- 1. Changed print_local_addr from true to false -->
3-
<!-- 2. Disabled STREAMING_STATE_TRANSFER, we don't use it -->
3+
<!-- 2. Disabled STATE_TRANSFER, we don't use it -->
44

55
<!--
66
Default stack using IP multicasting. It is similar to the "udp"
77
stack in stacks.xml, but doesn't use streaming state transfer and flushing
8+
author: Bela Ban
9+
version: $Id: udp.xml,v 1.40 2010/02/08 07:11:15 belaban Exp $
810
-->
11+
912
<config xmlns="urn:org:jgroups"
1013
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1114
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-2.8.xsd">
1215
<UDP
1316
mcast_port="${jgroups.udp.mcast_port:45588}"
1417
tos="8"
15-
ucast_recv_buf_size="20000000"
16-
ucast_send_buf_size="640000"
17-
mcast_recv_buf_size="25000000"
18-
mcast_send_buf_size="640000"
19-
loopback="false"
18+
ucast_recv_buf_size="20M"
19+
ucast_send_buf_size="640K"
20+
mcast_recv_buf_size="25M"
21+
mcast_send_buf_size="640K"
22+
loopback="true"
2023
discard_incompatible_packets="true"
21-
max_bundle_size="64000"
24+
max_bundle_size="64K"
2225
max_bundle_timeout="30"
2326
ip_ttl="${jgroups.udp.ip_ttl:2}"
2427
enable_bundling="true"
2528
enable_diagnostics="true"
2629
thread_naming_pattern="cl"
27-
num_timer_threads="4"
30+
timer.num_threads="4"
2831

2932
thread_pool.enabled="true"
3033
thread_pool.min_threads="2"
@@ -57,14 +60,14 @@
5760
discard_delivered_msgs="true"/>
5861
<UNICAST timeout="300,600,1200"/>
5962
<pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
60-
max_bytes="1000000"/>
63+
max_bytes="1M"/>
6164
<pbcast.GMS print_local_addr="false" join_timeout="3000"
6265

6366
view_bundling="true"/>
64-
<FC max_credits="500000"
67+
<FC max_credits="500K"
6568
min_threshold="0.20"/>
66-
<FRAG2 frag_size="60000"/>
69+
<FRAG2 frag_size="60K"/>
6770
<!--pbcast.STREAMING_STATE_TRANSFER /-->
68-
<!--<pbcast.STATE_TRANSFER/>-->
71+
<!--<pbcast.STATE_TRANSFER />-->
6972
<!-- pbcast.FLUSH /-->
7073
</config>

modules/elasticsearch/src/main/java/org/elasticsearch/discovery/jgroups/JgroupsDiscovery.java

+1-5
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import org.elasticsearch.discovery.DiscoveryException;
3030
import org.elasticsearch.discovery.InitialStateDiscoveryListener;
3131
import org.elasticsearch.env.Environment;
32-
import org.elasticsearch.threadpool.ThreadPool;
3332
import org.elasticsearch.transport.TransportService;
3433
import org.elasticsearch.util.component.AbstractComponent;
3534
import org.elasticsearch.util.component.Lifecycle;
@@ -66,8 +65,6 @@ public class JgroupsDiscovery extends AbstractComponent implements Discovery, Re
6665

6766
private final ClusterName clusterName;
6867

69-
private final ThreadPool threadPool;
70-
7168
private final TransportService transportService;
7269

7370
private final ClusterService clusterService;
@@ -85,10 +82,9 @@ public class JgroupsDiscovery extends AbstractComponent implements Discovery, Re
8582
private final CopyOnWriteArrayList<InitialStateDiscoveryListener> initialStateListeners = new CopyOnWriteArrayList<InitialStateDiscoveryListener>();
8683

8784
@Inject public JgroupsDiscovery(Settings settings, Environment environment, ClusterName clusterName,
88-
ThreadPool threadPool, TransportService transportService, ClusterService clusterService) {
85+
TransportService transportService, ClusterService clusterService) {
8986
super(settings);
9087
this.clusterName = clusterName;
91-
this.threadPool = threadPool;
9288
this.transportService = transportService;
9389
this.clusterService = clusterService;
9490

0 commit comments

Comments
 (0)