You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2016/06/23 09:13:18 UTC
[1/6] cassandra git commit: Allow nodetool info to run with readonly
JMX access
Repository: cassandra
Updated Branches:
refs/heads/cassandra-2.2 0171259d0 -> 774e59dc3
refs/heads/cassandra-3.0 40ab6312d -> 0d7eb1878
refs/heads/trunk c310adde0 -> 465702399
Allow nodetool info to run with readonly JMX access
Patch by J�r�me Mainaud; Reviewed by Paulo Motta for CASSANDRA-11755
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/774e59dc
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/774e59dc
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/774e59dc
Branch: refs/heads/cassandra-2.2
Commit: 774e59dc3d1e51b700413642416c202376bcb061
Parents: 0171259
Author: J�r�me Mainaud <je...@mainaud.com>
Authored: Tue Jun 21 10:25:53 2016 -0300
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Thu Jun 23 11:12:21 2016 +0200
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../cassandra/locator/EndpointSnitchInfo.java | 11 +++++++++++
.../locator/EndpointSnitchInfoMBean.java | 9 +++++++++
.../org/apache/cassandra/tools/NodeProbe.java | 18 ++----------------
4 files changed, 23 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/774e59dc/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 59a9794..0be1043 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
2.2.7
+ * Allow nodetool info to run with readonly JMX access (CASSANDRA-11755)
* Validate bloom_filter_fp_chance against lowest supported
value when the table is created (CASSANDRA-11920)
* RandomAccessReader: call isEOF() only when rebuffering, not for every read operation (CASSANDRA-12013)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/774e59dc/src/java/org/apache/cassandra/locator/EndpointSnitchInfo.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/locator/EndpointSnitchInfo.java b/src/java/org/apache/cassandra/locator/EndpointSnitchInfo.java
index c2f88bb..bbfabb6 100644
--- a/src/java/org/apache/cassandra/locator/EndpointSnitchInfo.java
+++ b/src/java/org/apache/cassandra/locator/EndpointSnitchInfo.java
@@ -25,6 +25,7 @@ import javax.management.MBeanServer;
import javax.management.ObjectName;
import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.utils.FBUtilities;
public class EndpointSnitchInfo implements EndpointSnitchInfoMBean
{
@@ -51,6 +52,16 @@ public class EndpointSnitchInfo implements EndpointSnitchInfoMBean
return DatabaseDescriptor.getEndpointSnitch().getRack(InetAddress.getByName(host));
}
+ public String getDatacenter()
+ {
+ return DatabaseDescriptor.getEndpointSnitch().getDatacenter(FBUtilities.getBroadcastAddress());
+ }
+
+ public String getRack()
+ {
+ return DatabaseDescriptor.getEndpointSnitch().getRack(FBUtilities.getBroadcastAddress());
+ }
+
public String getSnitchName()
{
return DatabaseDescriptor.getEndpointSnitch().getClass().getName();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/774e59dc/src/java/org/apache/cassandra/locator/EndpointSnitchInfoMBean.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/locator/EndpointSnitchInfoMBean.java b/src/java/org/apache/cassandra/locator/EndpointSnitchInfoMBean.java
index 84d2499..6de5022 100644
--- a/src/java/org/apache/cassandra/locator/EndpointSnitchInfoMBean.java
+++ b/src/java/org/apache/cassandra/locator/EndpointSnitchInfoMBean.java
@@ -38,6 +38,15 @@ public interface EndpointSnitchInfoMBean
*/
public String getDatacenter(String host) throws UnknownHostException;
+ /**
+ * Provides the Rack name depending on the respective snitch used for this node
+ */
+ public String getRack();
+
+ /**
+ * Provides the Datacenter name depending on the respective snitch used for this node
+ */
+ public String getDatacenter();
/**
* Provides the snitch name of the cluster
http://git-wip-us.apache.org/repos/asf/cassandra/blob/774e59dc/src/java/org/apache/cassandra/tools/NodeProbe.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java b/src/java/org/apache/cassandra/tools/NodeProbe.java
index 2f27cea..24c5874 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -780,26 +780,12 @@ public class NodeProbe implements AutoCloseable
public String getDataCenter()
{
- try
- {
- return getEndpointSnitchInfoProxy().getDatacenter(getEndpoint());
- }
- catch (UnknownHostException e)
- {
- return "Unknown";
- }
+ return getEndpointSnitchInfoProxy().getDatacenter();
}
public String getRack()
{
- try
- {
- return getEndpointSnitchInfoProxy().getRack(getEndpoint());
- }
- catch (UnknownHostException e)
- {
- return "Unknown";
- }
+ return getEndpointSnitchInfoProxy().getRack();
}
public List<String> getKeyspaces()
[5/6] cassandra git commit: Merge branch 'cassandra-2.2' into
cassandra-3.0
Posted by sl...@apache.org.
Merge branch 'cassandra-2.2' into cassandra-3.0
* cassandra-2.2:
Allow nodetool info to run with readonly JMX access
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0d7eb187
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0d7eb187
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0d7eb187
Branch: refs/heads/cassandra-3.0
Commit: 0d7eb18786a1e589ec803a07ac9ae9e77f481edb
Parents: 40ab631 774e59d
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Thu Jun 23 11:12:51 2016 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Thu Jun 23 11:12:51 2016 +0200
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../cassandra/locator/EndpointSnitchInfo.java | 11 +++++++++++
.../locator/EndpointSnitchInfoMBean.java | 9 +++++++++
.../org/apache/cassandra/tools/NodeProbe.java | 18 ++----------------
4 files changed, 23 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/0d7eb187/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index d57fb7d,0be1043..ddbac69
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,38 -1,10 +1,39 @@@
-2.2.7
+3.0.8
+ * Fix upgrading schema with super columns with non-text subcomparators (CASSANDRA-12023)
+ * Add TimeWindowCompactionStrategy (CASSANDRA-9666)
+Merged from 2.2:
+ * Allow nodetool info to run with readonly JMX access (CASSANDRA-11755)
* Validate bloom_filter_fp_chance against lowest supported
value when the table is created (CASSANDRA-11920)
- * RandomAccessReader: call isEOF() only when rebuffering, not for every read operation (CASSANDRA-12013)
* Don't send erroneous NEW_NODE notifications on restart (CASSANDRA-11038)
* StorageService shutdown hook should use a volatile variable (CASSANDRA-11984)
+Merged from 2.1:
+ * Prevent select statements with clustering key > 64k (CASSANDRA-11882)
+ * Fix clock skew corrupting other nodes with paxos (CASSANDRA-11991)
+ * Remove distinction between non-existing static columns and existing but null in LWTs (CASSANDRA-9842)
+ * Cache local ranges when calculating repair neighbors (CASSANDRA-11934)
+ * Allow LWT operation on static column with only partition keys (CASSANDRA-10532)
+ * Create interval tree over canonical sstables to avoid missing sstables during streaming (CASSANDRA-11886)
+ * cqlsh COPY FROM: shutdown parent cluster after forking, to avoid corrupting SSL connections (CASSANDRA-11749)
+
+
+3.0.7
+ * Fix legacy serialization of Thrift-generated non-compound range tombstones
+ when communicating with 2.x nodes (CASSANDRA-11930)
+ * Fix Directories instantiations where CFS.initialDirectories should be used (CASSANDRA-11849)
+ * Avoid referencing DatabaseDescriptor in AbstractType (CASSANDRA-11912)
+ * Fix sstables not being protected from removal during index build (CASSANDRA-11905)
+ * cqlsh: Suppress stack trace from Read/WriteFailures (CASSANDRA-11032)
+ * Remove unneeded code to repair index summaries that have
+ been improperly down-sampled (CASSANDRA-11127)
+ * Avoid WriteTimeoutExceptions during commit log replay due to materialized
+ view lock contention (CASSANDRA-11891)
+ * Prevent OOM failures on SSTable corruption, improve tests for corruption detection (CASSANDRA-9530)
+ * Use CFS.initialDirectories when clearing snapshots (CASSANDRA-11705)
+ * Allow compaction strategies to disable early open (CASSANDRA-11754)
+ * Refactor Materialized View code (CASSANDRA-11475)
+ * Update Java Driver (CASSANDRA-11615)
+Merged from 2.2:
* Persist local metadata earlier in startup sequence (CASSANDRA-11742)
* Run CommitLog tests with different compression settings (CASSANDRA-9039)
* cqlsh: fix tab completion for case-sensitive identifiers (CASSANDRA-11664)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/0d7eb187/src/java/org/apache/cassandra/tools/NodeProbe.java
----------------------------------------------------------------------
[2/6] cassandra git commit: Allow nodetool info to run with readonly
JMX access
Posted by sl...@apache.org.
Allow nodetool info to run with readonly JMX access
Patch by J�r�me Mainaud; Reviewed by Paulo Motta for CASSANDRA-11755
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/774e59dc
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/774e59dc
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/774e59dc
Branch: refs/heads/cassandra-3.0
Commit: 774e59dc3d1e51b700413642416c202376bcb061
Parents: 0171259
Author: J�r�me Mainaud <je...@mainaud.com>
Authored: Tue Jun 21 10:25:53 2016 -0300
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Thu Jun 23 11:12:21 2016 +0200
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../cassandra/locator/EndpointSnitchInfo.java | 11 +++++++++++
.../locator/EndpointSnitchInfoMBean.java | 9 +++++++++
.../org/apache/cassandra/tools/NodeProbe.java | 18 ++----------------
4 files changed, 23 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/774e59dc/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 59a9794..0be1043 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
2.2.7
+ * Allow nodetool info to run with readonly JMX access (CASSANDRA-11755)
* Validate bloom_filter_fp_chance against lowest supported
value when the table is created (CASSANDRA-11920)
* RandomAccessReader: call isEOF() only when rebuffering, not for every read operation (CASSANDRA-12013)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/774e59dc/src/java/org/apache/cassandra/locator/EndpointSnitchInfo.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/locator/EndpointSnitchInfo.java b/src/java/org/apache/cassandra/locator/EndpointSnitchInfo.java
index c2f88bb..bbfabb6 100644
--- a/src/java/org/apache/cassandra/locator/EndpointSnitchInfo.java
+++ b/src/java/org/apache/cassandra/locator/EndpointSnitchInfo.java
@@ -25,6 +25,7 @@ import javax.management.MBeanServer;
import javax.management.ObjectName;
import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.utils.FBUtilities;
public class EndpointSnitchInfo implements EndpointSnitchInfoMBean
{
@@ -51,6 +52,16 @@ public class EndpointSnitchInfo implements EndpointSnitchInfoMBean
return DatabaseDescriptor.getEndpointSnitch().getRack(InetAddress.getByName(host));
}
+ public String getDatacenter()
+ {
+ return DatabaseDescriptor.getEndpointSnitch().getDatacenter(FBUtilities.getBroadcastAddress());
+ }
+
+ public String getRack()
+ {
+ return DatabaseDescriptor.getEndpointSnitch().getRack(FBUtilities.getBroadcastAddress());
+ }
+
public String getSnitchName()
{
return DatabaseDescriptor.getEndpointSnitch().getClass().getName();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/774e59dc/src/java/org/apache/cassandra/locator/EndpointSnitchInfoMBean.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/locator/EndpointSnitchInfoMBean.java b/src/java/org/apache/cassandra/locator/EndpointSnitchInfoMBean.java
index 84d2499..6de5022 100644
--- a/src/java/org/apache/cassandra/locator/EndpointSnitchInfoMBean.java
+++ b/src/java/org/apache/cassandra/locator/EndpointSnitchInfoMBean.java
@@ -38,6 +38,15 @@ public interface EndpointSnitchInfoMBean
*/
public String getDatacenter(String host) throws UnknownHostException;
+ /**
+ * Provides the Rack name depending on the respective snitch used for this node
+ */
+ public String getRack();
+
+ /**
+ * Provides the Datacenter name depending on the respective snitch used for this node
+ */
+ public String getDatacenter();
/**
* Provides the snitch name of the cluster
http://git-wip-us.apache.org/repos/asf/cassandra/blob/774e59dc/src/java/org/apache/cassandra/tools/NodeProbe.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java b/src/java/org/apache/cassandra/tools/NodeProbe.java
index 2f27cea..24c5874 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -780,26 +780,12 @@ public class NodeProbe implements AutoCloseable
public String getDataCenter()
{
- try
- {
- return getEndpointSnitchInfoProxy().getDatacenter(getEndpoint());
- }
- catch (UnknownHostException e)
- {
- return "Unknown";
- }
+ return getEndpointSnitchInfoProxy().getDatacenter();
}
public String getRack()
{
- try
- {
- return getEndpointSnitchInfoProxy().getRack(getEndpoint());
- }
- catch (UnknownHostException e)
- {
- return "Unknown";
- }
+ return getEndpointSnitchInfoProxy().getRack();
}
public List<String> getKeyspaces()
[6/6] cassandra git commit: Merge branch 'cassandra-3.0' into trunk
Posted by sl...@apache.org.
Merge branch 'cassandra-3.0' into trunk
* cassandra-3.0:
Allow nodetool info to run with readonly JMX access
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/46570239
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/46570239
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/46570239
Branch: refs/heads/trunk
Commit: 465702399c064ede65e42a08be5f29103cb16b57
Parents: c310add 0d7eb18
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Thu Jun 23 11:13:03 2016 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Thu Jun 23 11:13:03 2016 +0200
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../cassandra/locator/EndpointSnitchInfo.java | 11 +++++++++++
.../locator/EndpointSnitchInfoMBean.java | 9 +++++++++
.../org/apache/cassandra/tools/NodeProbe.java | 18 ++----------------
4 files changed, 23 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/46570239/CHANGES.txt
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/46570239/src/java/org/apache/cassandra/tools/NodeProbe.java
----------------------------------------------------------------------
[4/6] cassandra git commit: Merge branch 'cassandra-2.2' into
cassandra-3.0
Posted by sl...@apache.org.
Merge branch 'cassandra-2.2' into cassandra-3.0
* cassandra-2.2:
Allow nodetool info to run with readonly JMX access
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0d7eb187
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0d7eb187
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0d7eb187
Branch: refs/heads/trunk
Commit: 0d7eb18786a1e589ec803a07ac9ae9e77f481edb
Parents: 40ab631 774e59d
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Thu Jun 23 11:12:51 2016 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Thu Jun 23 11:12:51 2016 +0200
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../cassandra/locator/EndpointSnitchInfo.java | 11 +++++++++++
.../locator/EndpointSnitchInfoMBean.java | 9 +++++++++
.../org/apache/cassandra/tools/NodeProbe.java | 18 ++----------------
4 files changed, 23 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/0d7eb187/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index d57fb7d,0be1043..ddbac69
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,38 -1,10 +1,39 @@@
-2.2.7
+3.0.8
+ * Fix upgrading schema with super columns with non-text subcomparators (CASSANDRA-12023)
+ * Add TimeWindowCompactionStrategy (CASSANDRA-9666)
+Merged from 2.2:
+ * Allow nodetool info to run with readonly JMX access (CASSANDRA-11755)
* Validate bloom_filter_fp_chance against lowest supported
value when the table is created (CASSANDRA-11920)
- * RandomAccessReader: call isEOF() only when rebuffering, not for every read operation (CASSANDRA-12013)
* Don't send erroneous NEW_NODE notifications on restart (CASSANDRA-11038)
* StorageService shutdown hook should use a volatile variable (CASSANDRA-11984)
+Merged from 2.1:
+ * Prevent select statements with clustering key > 64k (CASSANDRA-11882)
+ * Fix clock skew corrupting other nodes with paxos (CASSANDRA-11991)
+ * Remove distinction between non-existing static columns and existing but null in LWTs (CASSANDRA-9842)
+ * Cache local ranges when calculating repair neighbors (CASSANDRA-11934)
+ * Allow LWT operation on static column with only partition keys (CASSANDRA-10532)
+ * Create interval tree over canonical sstables to avoid missing sstables during streaming (CASSANDRA-11886)
+ * cqlsh COPY FROM: shutdown parent cluster after forking, to avoid corrupting SSL connections (CASSANDRA-11749)
+
+
+3.0.7
+ * Fix legacy serialization of Thrift-generated non-compound range tombstones
+ when communicating with 2.x nodes (CASSANDRA-11930)
+ * Fix Directories instantiations where CFS.initialDirectories should be used (CASSANDRA-11849)
+ * Avoid referencing DatabaseDescriptor in AbstractType (CASSANDRA-11912)
+ * Fix sstables not being protected from removal during index build (CASSANDRA-11905)
+ * cqlsh: Suppress stack trace from Read/WriteFailures (CASSANDRA-11032)
+ * Remove unneeded code to repair index summaries that have
+ been improperly down-sampled (CASSANDRA-11127)
+ * Avoid WriteTimeoutExceptions during commit log replay due to materialized
+ view lock contention (CASSANDRA-11891)
+ * Prevent OOM failures on SSTable corruption, improve tests for corruption detection (CASSANDRA-9530)
+ * Use CFS.initialDirectories when clearing snapshots (CASSANDRA-11705)
+ * Allow compaction strategies to disable early open (CASSANDRA-11754)
+ * Refactor Materialized View code (CASSANDRA-11475)
+ * Update Java Driver (CASSANDRA-11615)
+Merged from 2.2:
* Persist local metadata earlier in startup sequence (CASSANDRA-11742)
* Run CommitLog tests with different compression settings (CASSANDRA-9039)
* cqlsh: fix tab completion for case-sensitive identifiers (CASSANDRA-11664)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/0d7eb187/src/java/org/apache/cassandra/tools/NodeProbe.java
----------------------------------------------------------------------
[3/6] cassandra git commit: Allow nodetool info to run with readonly
JMX access
Posted by sl...@apache.org.
Allow nodetool info to run with readonly JMX access
Patch by J�r�me Mainaud; Reviewed by Paulo Motta for CASSANDRA-11755
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/774e59dc
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/774e59dc
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/774e59dc
Branch: refs/heads/trunk
Commit: 774e59dc3d1e51b700413642416c202376bcb061
Parents: 0171259
Author: J�r�me Mainaud <je...@mainaud.com>
Authored: Tue Jun 21 10:25:53 2016 -0300
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Thu Jun 23 11:12:21 2016 +0200
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../cassandra/locator/EndpointSnitchInfo.java | 11 +++++++++++
.../locator/EndpointSnitchInfoMBean.java | 9 +++++++++
.../org/apache/cassandra/tools/NodeProbe.java | 18 ++----------------
4 files changed, 23 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/774e59dc/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 59a9794..0be1043 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
2.2.7
+ * Allow nodetool info to run with readonly JMX access (CASSANDRA-11755)
* Validate bloom_filter_fp_chance against lowest supported
value when the table is created (CASSANDRA-11920)
* RandomAccessReader: call isEOF() only when rebuffering, not for every read operation (CASSANDRA-12013)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/774e59dc/src/java/org/apache/cassandra/locator/EndpointSnitchInfo.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/locator/EndpointSnitchInfo.java b/src/java/org/apache/cassandra/locator/EndpointSnitchInfo.java
index c2f88bb..bbfabb6 100644
--- a/src/java/org/apache/cassandra/locator/EndpointSnitchInfo.java
+++ b/src/java/org/apache/cassandra/locator/EndpointSnitchInfo.java
@@ -25,6 +25,7 @@ import javax.management.MBeanServer;
import javax.management.ObjectName;
import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.utils.FBUtilities;
public class EndpointSnitchInfo implements EndpointSnitchInfoMBean
{
@@ -51,6 +52,16 @@ public class EndpointSnitchInfo implements EndpointSnitchInfoMBean
return DatabaseDescriptor.getEndpointSnitch().getRack(InetAddress.getByName(host));
}
+ public String getDatacenter()
+ {
+ return DatabaseDescriptor.getEndpointSnitch().getDatacenter(FBUtilities.getBroadcastAddress());
+ }
+
+ public String getRack()
+ {
+ return DatabaseDescriptor.getEndpointSnitch().getRack(FBUtilities.getBroadcastAddress());
+ }
+
public String getSnitchName()
{
return DatabaseDescriptor.getEndpointSnitch().getClass().getName();
http://git-wip-us.apache.org/repos/asf/cassandra/blob/774e59dc/src/java/org/apache/cassandra/locator/EndpointSnitchInfoMBean.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/locator/EndpointSnitchInfoMBean.java b/src/java/org/apache/cassandra/locator/EndpointSnitchInfoMBean.java
index 84d2499..6de5022 100644
--- a/src/java/org/apache/cassandra/locator/EndpointSnitchInfoMBean.java
+++ b/src/java/org/apache/cassandra/locator/EndpointSnitchInfoMBean.java
@@ -38,6 +38,15 @@ public interface EndpointSnitchInfoMBean
*/
public String getDatacenter(String host) throws UnknownHostException;
+ /**
+ * Provides the Rack name depending on the respective snitch used for this node
+ */
+ public String getRack();
+
+ /**
+ * Provides the Datacenter name depending on the respective snitch used for this node
+ */
+ public String getDatacenter();
/**
* Provides the snitch name of the cluster
http://git-wip-us.apache.org/repos/asf/cassandra/blob/774e59dc/src/java/org/apache/cassandra/tools/NodeProbe.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeProbe.java b/src/java/org/apache/cassandra/tools/NodeProbe.java
index 2f27cea..24c5874 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -780,26 +780,12 @@ public class NodeProbe implements AutoCloseable
public String getDataCenter()
{
- try
- {
- return getEndpointSnitchInfoProxy().getDatacenter(getEndpoint());
- }
- catch (UnknownHostException e)
- {
- return "Unknown";
- }
+ return getEndpointSnitchInfoProxy().getDatacenter();
}
public String getRack()
{
- try
- {
- return getEndpointSnitchInfoProxy().getRack(getEndpoint());
- }
- catch (UnknownHostException e)
- {
- return "Unknown";
- }
+ return getEndpointSnitchInfoProxy().getRack();
}
public List<String> getKeyspaces()