cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alek...@apache.org
Subject [1/2] git commit: Add reloadtriggers command to nodetool
Date Mon, 21 Oct 2013 07:40:42 GMT
Updated Branches:
  refs/heads/trunk 46681108e -> d1f8c6f7a


Add reloadtriggers command to nodetool

patch by Suresh; reviewed by Aleksey Yeschenko for CASSANDRA-4949


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

Branch: refs/heads/trunk
Commit: edd1226fda7408f97ded52a8cdab0ba1dea8d0df
Parents: 146f813
Author: Aleksey Yeschenko <aleksey@apache.org>
Authored: Mon Oct 21 15:38:33 2013 +0800
Committer: Aleksey Yeschenko <aleksey@apache.org>
Committed: Mon Oct 21 15:38:33 2013 +0800

----------------------------------------------------------------------
 CHANGES.txt                                                  | 1 +
 src/java/org/apache/cassandra/service/StorageProxy.java      | 2 +-
 src/java/org/apache/cassandra/service/StorageProxyMBean.java | 2 +-
 src/java/org/apache/cassandra/tools/NodeCmd.java             | 7 ++++++-
 src/java/org/apache/cassandra/tools/NodeProbe.java           | 5 +++++
 src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml   | 3 +++
 6 files changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/edd1226f/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 401b3ff..351c625 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -24,6 +24,7 @@
  * Save compaction history to system keyspace (CASSANDRA-5078)
  * Fix NPE if StorageService.getOperationMode() is executed before full startup (CASSANDRA-6166)
  * CQL3: support pre-epoch longs for TimestampType (CASSANDRA-6212)
+ * Add reloadtriggers command to nodetool (CASSANDRA-4949)
 Merged from 1.2:
  * (Hadoop) Require CFRR batchSize to be at least 2 (CASSANDRA-6114)
  * Add a warning for small LCS sstable size (CASSANDRA-6191)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/edd1226f/src/java/org/apache/cassandra/service/StorageProxy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageProxy.java b/src/java/org/apache/cassandra/service/StorageProxy.java
index 259d2f5..e177eed 100644
--- a/src/java/org/apache/cassandra/service/StorageProxy.java
+++ b/src/java/org/apache/cassandra/service/StorageProxy.java
@@ -2043,7 +2043,7 @@ public class StorageProxy implements StorageProxyMBean
 
     public Long getTruncateRpcTimeout() { return DatabaseDescriptor.getTruncateRpcTimeout();
}
     public void setTruncateRpcTimeout(Long timeoutInMillis) { DatabaseDescriptor.setTruncateRpcTimeout(timeoutInMillis);
}
-    public void reloadTriggerClass() { TriggerExecutor.instance.reloadClasses(); }
+    public void reloadTriggerClasses() { TriggerExecutor.instance.reloadClasses(); }
 
     
     public long getReadRepairAttempted() {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/edd1226f/src/java/org/apache/cassandra/service/StorageProxyMBean.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/StorageProxyMBean.java b/src/java/org/apache/cassandra/service/StorageProxyMBean.java
index 98c1850..ad7d4c7 100644
--- a/src/java/org/apache/cassandra/service/StorageProxyMBean.java
+++ b/src/java/org/apache/cassandra/service/StorageProxyMBean.java
@@ -92,7 +92,7 @@ public interface StorageProxyMBean
     public Long getTruncateRpcTimeout();
     public void setTruncateRpcTimeout(Long timeoutInMillis);
 
-    public void reloadTriggerClass();
+    public void reloadTriggerClasses();
 
     public long getReadRepairAttempted();
     public long getReadRepairRepairedBlocking();

http://git-wip-us.apache.org/repos/asf/cassandra/blob/edd1226f/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 62b15dd..57de7d0 100644
--- a/src/java/org/apache/cassandra/tools/NodeCmd.java
+++ b/src/java/org/apache/cassandra/tools/NodeCmd.java
@@ -169,7 +169,8 @@ public class NodeCmd
         RESETLOCALSCHEMA,
         ENABLEBACKUP,
         DISABLEBACKUP,
-        SETCACHEKEYSTOSAVE
+        SETCACHEKEYSTOSAVE,
+        RELOADTRIGGERS
     }
 
 
@@ -1299,6 +1300,10 @@ public class NodeCmd
                     nodeCmd.printRangeKeySample(System.out);
                     break;
 
+                case RELOADTRIGGERS :
+                    probe.reloadTriggers();
+                    break;
+
                 default :
                     throw new RuntimeException("Unreachable code.");
             }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/edd1226f/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 0d58979..2610b2f 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -875,6 +875,11 @@ public class NodeProbe
     {
         return compactionProxy.getCompactionHistory();
     }
+
+    public void reloadTriggers()
+    {
+        spProxy.reloadTriggerClasses();
+    }
 }
 
 class ColumnFamilyStoreMBeanIterator implements Iterator<Map.Entry<String, ColumnFamilyStoreMBean>>

http://git-wip-us.apache.org/repos/asf/cassandra/blob/edd1226f/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml
----------------------------------------------------------------------
diff --git a/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml b/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml
index 859f0d3..d0c3d0d 100644
--- a/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml
+++ b/src/resources/org/apache/cassandra/tools/NodeToolHelp.yaml
@@ -208,3 +208,6 @@ commands:
   - name: predictconsistency <replication_factor> <time> [versions] [latency_percentile]
     help: |
       Predict latency and consistency "t" ms after writes
+  - name: reloadtriggers
+    help: |
+      reload trigger classes


Mime
View raw message