Skip to content

Commit

Permalink
Reset the default port_range to 50.
Browse files Browse the repository at this point in the history
This default setting seems weird, but it aligns with the default
range used by the TCP protocol for creating server ports.
Reset the version to 1.4.1, since the default is not changing.
  • Loading branch information
ctrimble committed Jan 15, 2017
1 parent f70cbf1 commit 1091a4c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -14,7 +14,7 @@ To use AWS auto discovery, you need to add a dependency to this package in your
<dependency>
<groupId>com.meltmedia.jgroups</groupId>
<artifactId>jgroups-aws</artifactId>
<version>1.5.0</version>
<version>1.4.1</version>
</dependency>
```

Expand All @@ -39,7 +39,7 @@ Configuration Options
---------------------
* timeout - the timeout in milliseconds
* port_number - the port number that the nodes will communicate over. This needs to be the same on all nodes. The default is 7800.
* port_range - the number of additional ports to be probed for membership. A port_range of 0 does not probe additional ports. Example: initial_hosts=A[7800] port_range=0 probes A:7800, port_range=1 probes A:7800 and A:7801. The default is 0 in versions 1.5+, was 50 previously.
* port_range - the number of additional ports to be probed for membership. A port_range of 0 does not probe additional ports. Example: initial_hosts=A[7800] port_range=0 probes A:7800, port_range=1 probes A:7800 and A:7801. The default is 50.
* tags - A comma delimited list of EC2 node tag names. The current nodes values are matched against other nodes to find
cluster members.
* filters - A colon delimited list of filters. Each filter defines a name and a comma delimited list of possible values.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -10,7 +10,7 @@

<groupId>com.meltmedia.jgroups</groupId>
<artifactId>jgroups-aws</artifactId>
<version>1.5.0-SNAPSHOT</version>
<version>1.4.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>JGroups AWS Discovery</name>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/meltmedia/jgroups/aws/AWS_PING.java
Expand Up @@ -169,8 +169,8 @@ public class AWS_PING extends Discovery {
protected String tags;
@Property(description = "Number of additional ports to be probed for membership. A port_range of 0 does not "
+ "probe additional ports. Example: initial_hosts=A[7800] port_range=0 probes A:7800, port_range=1 probes "
+ "A:7800 and A:7801")
protected int port_range = 0;
+ "A:7800 and A:7801. The default is 50.")
protected int port_range = 50;
@Property(description = "The port number being used for cluster membership. The default is 7800.")
protected int port_number = 7800;
@Property(description = "Turns on AWS error message logging.")
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/com/meltmedia/jgroups/aws/PortRangeTest.java
Expand Up @@ -7,6 +7,7 @@
import java.util.List;

import org.hamcrest.Matcher;
import org.hamcrest.Matchers;
import org.jgroups.PhysicalAddress;
import org.jgroups.stack.IpAddress;
import org.junit.Test;
Expand Down Expand Up @@ -45,7 +46,7 @@ public static Collection<Object[]> parameters() throws UnknownHostException {
{
"default port and range",
awsPingDefaultPortAndRange(),
matchClusterPorts(7800)
Matchers.hasSize(51)
}
});
}
Expand Down

0 comments on commit 1091a4c

Please sign in to comment.