cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [4/6] git commit: Expose schema version in nodetool. Patch by Sam Tunnicliffe, reviewed by brandonwilliams for CASSANDRA-3937
Date Mon, 26 Mar 2012 18:27:14 GMT
Expose schema version in nodetool.
Patch by Sam Tunnicliffe, reviewed by brandonwilliams for CASSANDRA-3937


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c38d3263
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c38d3263
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c38d3263

Branch: refs/heads/trunk
Commit: c38d32638eea94114c578c3c9f400fd581aade39
Parents: d3c5dbd
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Mon Mar 26 13:17:27 2012 -0500
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Mon Mar 26 13:17:27 2012 -0500

----------------------------------------------------------------------
 .../apache/cassandra/service/StorageService.java   |    5 +++++
 .../cassandra/service/StorageServiceMBean.java     |    7 +++++++
 src/java/org/apache/cassandra/tools/NodeCmd.java   |    1 +
 src/java/org/apache/cassandra/tools/NodeProbe.java |    5 +++++
 4 files changed, 18 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c38d3263/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageService.java b/src/java/org/apache/cassandra/service/StorageService.java
index 66e28f4..5920c36 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -1639,6 +1639,11 @@ public class StorageService implements IEndpointStateChangeSubscriber,
StorageSe
         return FBUtilities.getReleaseVersionString();
     }
 
+    public String getSchemaVersion()
+    {
+        return Schema.instance.getVersion().toString();
+    }
+    
     public List<String> getLeavingNodes()
     {
         return stringify(tokenMetadata_.getLeavingEndpoints());

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c38d3263/src/java/org/apache/cassandra/service/StorageServiceMBean.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageServiceMBean.java b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
index 184a935..404c794 100644
--- a/src/java/org/apache/cassandra/service/StorageServiceMBean.java
+++ b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
@@ -84,6 +84,13 @@ public interface StorageServiceMBean
     public String getReleaseVersion();
 
     /**
+     * Fetch a string representation of the current Schema version.
+     * @return A string representation of the Schema version.
+     */
+    public String getSchemaVersion();
+
+    
+    /**
      * Get the list of all data file locations from conf
      * @return String array of all locations
      */

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c38d3263/src/java/org/apache/cassandra/tools/NodeCmd.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeCmd.java b/src/java/org/apache/cassandra/tools/NodeCmd.java
index 46b369b..8540deb 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -837,6 +837,7 @@ public class NodeCmd
 
     private void printDescribeRing(String keyspaceName, PrintStream out)
     {
+        out.println("Schema Version:" + probe.getSchemaVersion());
         out.println("TokenRange: ");
         try
         {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c38d3263/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 2c51990..cea2fc6 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -648,6 +648,11 @@ public class NodeProbe
         ssProxy.setStreamThroughputMbPerSec(value);
     }
 
+    public String getSchemaVersion()
+    {
+        return ssProxy.getSchemaVersion();
+    }
+    
     public List<String> describeRing(String keyspaceName) throws InvalidRequestException
     {
         return ssProxy.describeRingJMX(keyspaceName);


Mime
View raw message