cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [2/3] cassandra git commit: Add nodetool statushandoff/statusbackup
Date Thu, 05 Mar 2015 23:29:37 GMT
Add nodetool statushandoff/statusbackup

patch by Prajakta Bhosale; reviewed by yukim for CASSANDRA-8912


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

Branch: refs/heads/trunk
Commit: e8fbfc0822db4f7635549e5f6c45e103562d0c0c
Parents: 4ce409e
Author: Prajakta Bhosale <prajakta143@gmail.com>
Authored: Thu Mar 5 17:24:10 2015 -0600
Committer: Yuki Morishita <yukim@apache.org>
Committed: Thu Mar 5 17:24:58 2015 -0600

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../org/apache/cassandra/tools/NodeProbe.java   | 10 +++++++
 .../org/apache/cassandra/tools/NodeTool.java    | 28 ++++++++++++++++++++
 3 files changed, 39 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e8fbfc08/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 59f9207..b8270d5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -31,6 +31,7 @@
    marked are in the live set (CASSANDRA-8689)
  * cassandra-stress support for varint (CASSANDRA-8882)
  * Fix Adler32 digest for compressed sstables (CASSANDRA-8778)
+ * Add nodetool statushandoff/statusbackup (CASSANDRA-8912)
 Merged from 2.0:
  * Fix regression in mixed single and multi-column relation support for
    SELECT statements (CASSANDRA-8613)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e8fbfc08/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 f124589..fc251a2 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -598,6 +598,11 @@ public class NodeProbe implements AutoCloseable
         ssProxy.setIncrementalBackupsEnabled(enabled);
     }
 
+    public boolean isIncrementalBackupsEnabled()
+    {
+        return ssProxy.isIncrementalBackupsEnabled();
+    }
+
     public void setCacheCapacities(int keyCacheCapacity, int rowCacheCapacity, int counterCacheCapacity)
     {
         try
@@ -796,6 +801,11 @@ public class NodeProbe implements AutoCloseable
         spProxy.setHintedHandoffEnabled(true);
     }
 
+    public boolean isHandoffEnabled()
+    {
+        return spProxy.getHintedHandoffEnabled();
+    }
+
     public void enableHintedHandoff(String dcNames)
     {
         spProxy.setHintedHandoffEnabledByDCList(dcNames);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e8fbfc08/src/java/org/apache/cassandra/tools/NodeTool.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/NodeTool.java b/src/java/org/apache/cassandra/tools/NodeTool.java
index 9094fbd..e0ad641 100644
--- a/src/java/org/apache/cassandra/tools/NodeTool.java
+++ b/src/java/org/apache/cassandra/tools/NodeTool.java
@@ -130,6 +130,8 @@ public class NodeTool
                 StatusBinary.class,
                 StatusGossip.class,
                 StatusThrift.class,
+                StatusBackup.class,
+                StatusHandoff.class,
                 Stop.class,
                 StopDaemon.class,
                 Version.class,
@@ -2315,6 +2317,32 @@ public class NodeTool
         }
     }
 
+    @Command(name = "statusbackup", description = "Status of incremental backup")
+    public static class StatusBackup extends NodeToolCmd
+    {
+        @Override
+        public void execute(NodeProbe probe)
+        {
+            System.out.println(
+                    probe.isIncrementalBackupsEnabled()
+                    ? "running"
+                    : "not running");
+        }
+    }
+
+    @Command(name = "statushandoff", description = "Status of storing future hints on the
current node")
+    public static class StatusHandoff extends NodeToolCmd
+    {
+        @Override
+        public void execute(NodeProbe probe)
+        {
+            System.out.println(
+                    probe.isHandoffEnabled()
+                    ? "running"
+                    : "not running");
+        }
+    }
+
     @Command(name = "stop", description = "Stop compaction")
     public static class Stop extends NodeToolCmd
     {


Mime
View raw message