You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by pa...@apache.org on 2016/12/09 18:28:51 UTC
[4/4] cassandra git commit: Remove outboundBindAny configuration
property
Remove outboundBindAny configuration property
Patch by Milan Majercik; Reviewed by Paulo Motta for CASSANDRA-12673
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/47d604de
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/47d604de
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/47d604de
Branch: refs/heads/cassandra-3.11
Commit: 47d604deb0b43758461b5532b69ffc2de2df9036
Parents: f176c57
Author: mmajercik <mm...@specter.firstmobileaffiliate.com>
Authored: Thu Nov 10 16:31:03 2016 +0100
Committer: Paulo Motta <pa...@apache.org>
Committed: Fri Dec 9 16:16:17 2016 -0200
----------------------------------------------------------------------
CHANGES.txt | 1 +
NEWS.txt | 1 +
src/java/org/apache/cassandra/config/Config.java | 12 ------------
.../cassandra/hadoop/cql3/CqlBulkRecordWriter.java | 1 -
.../apache/cassandra/net/OutboundTcpConnectionPool.java | 7 +------
5 files changed, 3 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/47d604de/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 6da6b4f..2bf1ead 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
3.10
+ * Remove outboundBindAny configuration property (CASSANDRA-12673)
* Use correct bounds for all-data range when filtering (CASSANDRA-12666)
* Remove timing window in test case (CASSANDRA-12875)
* Resolve unit testing without JCE security libraries installed (CASSANDRA-12945)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/47d604de/NEWS.txt
----------------------------------------------------------------------
diff --git a/NEWS.txt b/NEWS.txt
index 80a8797..e6c8c10 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -78,6 +78,7 @@ New features
- Add support to "unset" JSON fields in prepared statements by specifying DEFAULT UNSET.
See CASSANDRA-11424 for details
- Allow TTL with null value on insert and update. It will be treated as equivalent to inserting a 0.
+ - Removed outboundBindAny configuration property. See CASSANDRA-12673 for details.
Upgrading
---------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/47d604de/src/java/org/apache/cassandra/config/Config.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/Config.java b/src/java/org/apache/cassandra/config/Config.java
index b1318d9..be0517f 100644
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@ -277,8 +277,6 @@ public class Config
public MemtableAllocationType memtable_allocation_type = MemtableAllocationType.heap_buffers;
- private static boolean outboundBindAny = false;
-
public volatile int tombstone_warn_threshold = 1000;
public volatile int tombstone_failure_threshold = 100000;
@@ -357,16 +355,6 @@ public class Config
public volatile boolean back_pressure_enabled = false;
public volatile ParameterizedClass back_pressure_strategy;
- public static boolean getOutboundBindAny()
- {
- return outboundBindAny;
- }
-
- public static void setOutboundBindAny(boolean value)
- {
- outboundBindAny = value;
- }
-
/**
* @deprecated migrate to {@link DatabaseDescriptor#isClientInitialized()}
*/
http://git-wip-us.apache.org/repos/asf/cassandra/blob/47d604de/src/java/org/apache/cassandra/hadoop/cql3/CqlBulkRecordWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/hadoop/cql3/CqlBulkRecordWriter.java b/src/java/org/apache/cassandra/hadoop/cql3/CqlBulkRecordWriter.java
index 2ed37ee..fd9ed00 100644
--- a/src/java/org/apache/cassandra/hadoop/cql3/CqlBulkRecordWriter.java
+++ b/src/java/org/apache/cassandra/hadoop/cql3/CqlBulkRecordWriter.java
@@ -105,7 +105,6 @@ public class CqlBulkRecordWriter extends RecordWriter<Object, List<ByteBuffer>>
CqlBulkRecordWriter(Configuration conf) throws IOException
{
- Config.setOutboundBindAny(true);
this.conf = conf;
DatabaseDescriptor.setStreamThroughputOutboundMegabitsPerSec(Integer.parseInt(conf.get(STREAM_THROTTLE_MBITS, "0")));
maxFailures = Integer.parseInt(conf.get(MAX_FAILED_HOSTS, "0"));
http://git-wip-us.apache.org/repos/asf/cassandra/blob/47d604de/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java b/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
index b0391ba..9f9ffee 100644
--- a/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
+++ b/src/java/org/apache/cassandra/net/OutboundTcpConnectionPool.java
@@ -138,16 +138,11 @@ public class OutboundTcpConnectionPool
// zero means 'bind on any available port.'
if (isEncryptedChannel(endpoint))
{
- if (Config.getOutboundBindAny())
- return SSLFactory.getSocket(DatabaseDescriptor.getServerEncryptionOptions(), endpoint, DatabaseDescriptor.getSSLStoragePort());
- else
- return SSLFactory.getSocket(DatabaseDescriptor.getServerEncryptionOptions(), endpoint, DatabaseDescriptor.getSSLStoragePort(), FBUtilities.getLocalAddress(), 0);
+ return SSLFactory.getSocket(DatabaseDescriptor.getServerEncryptionOptions(), endpoint, DatabaseDescriptor.getSSLStoragePort());
}
else
{
SocketChannel channel = SocketChannel.open();
- if (!Config.getOutboundBindAny())
- channel.bind(new InetSocketAddress(FBUtilities.getLocalAddress(), 0));
channel.connect(new InetSocketAddress(endpoint, DatabaseDescriptor.getStoragePort()));
return channel.socket();
}