cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [1/2] git commit: CASSANDRA-7635, rebase for 2.1
Date Thu, 07 Aug 2014 14:07:38 GMT
Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 6beb13f19 -> 78b734e2e


CASSANDRA-7635, rebase for 2.1


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

Branch: refs/heads/cassandra-2.1
Commit: e0c4c6e60b682630ecc1285d4def1a652d9203dc
Parents: fd5cf23
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Thu Aug 7 16:06:39 2014 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Thu Aug 7 16:06:39 2014 +0200

----------------------------------------------------------------------
 .../apache/cassandra/config/DatabaseDescriptor.java   |  5 +++++
 .../org/apache/cassandra/service/StorageService.java  |  6 ++++++
 .../apache/cassandra/service/StorageServiceMBean.java |  3 +++
 src/java/org/apache/cassandra/tools/NodeProbe.java    |  4 ++++
 src/java/org/apache/cassandra/tools/NodeTool.java     | 14 ++++++++++++++
 5 files changed, 32 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 4e67c44..d1511ba 100644
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@ -1354,6 +1354,11 @@ public class DatabaseDescriptor
         return conf.batchlog_replay_throttle_in_kb;
     }
 
+    public static void setHintedHandoffThrottleInKB(Integer throttleInKB)
+    {
+        conf.hinted_handoff_throttle_in_kb = throttleInKB;
+    }
+
     public static int getMaxHintsThread()
     {
         return conf.max_hints_delivery_threads;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/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 46e6588..1e3f699 100644
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@ -3957,4 +3957,10 @@ public class StorageService extends NotificationBroadcasterSupport
implements IE
     {
         DatabaseDescriptor.setTombstoneFailureThreshold(threshold);
     }
+
+    public void setHintedHandoffThrottleInKB(int throttleInKB)
+    {
+        DatabaseDescriptor.setHintedHandoffThrottleInKB(throttleInKB);
+        logger.info(String.format("Updated hinted_handoff_throttle_in_kb to %d", throttleInKB));
+    }
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/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 320f7dc..b4cc45b 100644
--- a/src/java/org/apache/cassandra/service/StorageServiceMBean.java
+++ b/src/java/org/apache/cassandra/service/StorageServiceMBean.java
@@ -511,4 +511,7 @@ public interface StorageServiceMBean extends NotificationEmitter
     public int getTombstoneFailureThreshold();
     /** Sets the threshold for abandoning queries with many tombstones */
     public void setTombstoneFailureThreshold(int tombstoneDebugThreshold);
+
+    /** Sets the hinted handoff throttle in kb per second, per delivery thread. */
+    public void setHintedHandoffThrottleInKB(int throttleInKB);
 }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/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 f14de12..1a2364b 100644
--- a/src/java/org/apache/cassandra/tools/NodeProbe.java
+++ b/src/java/org/apache/cassandra/tools/NodeProbe.java
@@ -602,6 +602,10 @@ public class NodeProbe implements AutoCloseable
         }
     }
 
+    public void setHintedHandoffThrottleInKB(int throttleInKB)
+    {
+        ssProxy.setHintedHandoffThrottleInKB(throttleInKB);
+    }
 
     public List<InetAddress> getEndpoints(String keyspace, String cf, String key)
     {

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e0c4c6e6/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 63d48c4..b25edd9 100644
--- a/src/java/org/apache/cassandra/tools/NodeTool.java
+++ b/src/java/org/apache/cassandra/tools/NodeTool.java
@@ -114,6 +114,7 @@ public class NodeTool
                 RemoveNode.class,
                 Repair.class,
                 SetCacheCapacity.class,
+                SetHintedHandoffThrottleInKB.class,
                 SetCompactionThreshold.class,
                 SetCompactionThroughput.class,
                 SetStreamThroughput.class,
@@ -1673,6 +1674,19 @@ public class NodeTool
         }
     }
 
+    @Command(name = "sethintedhandoffthrottlekb", description =  "Set hinted handoff throttle
in kb per second, per delivery thread.")
+    public static class SetHintedHandoffThrottleInKB extends NodeToolCmd
+    {
+        @Arguments(title = "throttle_in_kb", usage = "<value_in_kb_per_sec>", description
= "Value in KB per second", required = true)
+        private Integer throttleInKB = null;
+
+        @Override
+        public void execute(NodeProbe probe)
+        {
+            probe.setHintedHandoffThrottleInKB(throttleInKB);
+        }
+    }
+
     @Command(name = "setstreamthroughput", description = "Set the MB/s throughput cap for
streaming in the system, or 0 to disable throttling")
     public static class SetStreamThroughput extends NodeToolCmd
     {


Mime
View raw message