cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From goffi...@apache.org
Subject svn commit: r1068497 - in /cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/tools: NodeCmd.java NodeProbe.java
Date Tue, 08 Feb 2011 18:13:01 GMT
Author: goffinet
Date: Tue Feb  8 18:13:00 2011
New Revision: 1068497

URL: http://svn.apache.org/viewvc?rev=1068497&view=rev
Log:
Add the ability to enable/disable Thrift through nodetool patch by goffinet; reviewed by slebresne
for CASSANDRA-2135

Modified:
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/tools/NodeCmd.java
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/tools/NodeProbe.java

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/tools/NodeCmd.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/tools/NodeCmd.java?rev=1068497&r1=1068496&r2=1068497&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/tools/NodeCmd.java (original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/tools/NodeCmd.java Tue
Feb  8 18:13:00 2011
@@ -74,7 +74,8 @@ public class NodeCmd {
         RING, INFO, CFSTATS, SNAPSHOT, CLEARSNAPSHOT, VERSION, TPSTATS, FLUSH, DRAIN,
         DECOMMISSION, MOVE, LOADBALANCE, REMOVETOKEN, REPAIR, CLEANUP, COMPACT,
         SETCACHECAPACITY, GETCOMPACTIONTHRESHOLD, SETCOMPACTIONTHRESHOLD, NETSTATS, CFHISTOGRAMS,
-        COMPACTIONSTATS, DISABLEGOSSIP, ENABLEGOSSIP, INVALIDATEKEYCACHE, INVALIDATEROWCACHE
+        COMPACTIONSTATS, DISABLEGOSSIP, ENABLEGOSSIP, INVALIDATEKEYCACHE, INVALIDATEROWCACHE,
+        DISABLETHRIFT, ENABLETHRIFT
     }
 
     
@@ -99,6 +100,8 @@ public class NodeCmd {
         addCmdHelp(header, "compactionstats", "Print statistics on compactions");
         addCmdHelp(header, "disablegossip", "Disable gossip (effectively marking the node
dead)");
         addCmdHelp(header, "enablegossip", "Reenable gossip");
+        addCmdHelp(header, "disablethrift", "Disable thrift server");
+        addCmdHelp(header, "enablethrift", "Reenable thrift server");
 
         // One arg
         addCmdHelp(header, "snapshot [snapshotname]", "Take a snapshot using optional name
snapshotname");
@@ -537,6 +540,8 @@ public class NodeCmd {
             case COMPACTIONSTATS : nodeCmd.printCompactionStats(System.out); break;
             case DISABLEGOSSIP   : probe.stopGossiping(); break;
             case ENABLEGOSSIP    : probe.startGossiping(); break;
+            case DISABLETHRIFT   : probe.stopThriftServer(); break;
+            case ENABLETHRIFT    : probe.startThriftServer(); break;
 
             case DRAIN :
                 try { probe.drain(); }

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/tools/NodeProbe.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/tools/NodeProbe.java?rev=1068497&r1=1068496&r2=1068497&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/tools/NodeProbe.java (original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/tools/NodeProbe.java Tue
Feb  8 18:13:00 2011
@@ -524,6 +524,16 @@ public class NodeProbe
         ssProxy.startGossiping();
     }
 
+    public void stopThriftServer()
+    {
+        ssProxy.stopRPCServer();
+    }
+
+    public void startThriftServer()
+    {
+        ssProxy.startRPCServer();
+    }
+
     public boolean isInitialized()
     {
         return ssProxy.isInitialized();



Mime
View raw message