cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [1/3] git commit: Allow overriding available processors with -Dcassandra.available_processors Patch by brandonwilliams, reviewed by iamaleksey for CASSANDRA-4790
Date Wed, 05 Dec 2012 20:48:16 GMT
Updated Branches:
  refs/heads/trunk c533b8885 -> 7ec4f5a6e


Allow overriding available processors with
-Dcassandra.available_processors
Patch by brandonwilliams, reviewed by iamaleksey for
CASSANDRA-4790


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

Branch: refs/heads/trunk
Commit: 7ec4f5a6e5256b135c8fbf7df2eb110a133c159a
Parents: d6d4151
Author: Brandon Williams <brandonwilliams@apache.org>
Authored: Wed Dec 5 14:26:13 2012 -0600
Committer: Brandon Williams <brandonwilliams@apache.org>
Committed: Wed Dec 5 14:48:08 2012 -0600

----------------------------------------------------------------------
 .../apache/cassandra/concurrent/StageManager.java  |    1 +
 .../apache/cassandra/thrift/CustomTHsHaServer.java |    3 ++-
 2 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7ec4f5a6/src/java/org/apache/cassandra/concurrent/StageManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/concurrent/StageManager.java b/src/java/org/apache/cassandra/concurrent/StageManager.java
index bf2e4c2..be66dde 100644
--- a/src/java/org/apache/cassandra/concurrent/StageManager.java
+++ b/src/java/org/apache/cassandra/concurrent/StageManager.java
@@ -24,6 +24,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.cassandra.net.MessagingService;
+import org.apache.cassandra.utils.FBUtilities;
 
 import static org.apache.cassandra.config.DatabaseDescriptor.*;
 import org.apache.cassandra.utils.FBUtilities;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/7ec4f5a6/src/java/org/apache/cassandra/thrift/CustomTHsHaServer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/thrift/CustomTHsHaServer.java b/src/java/org/apache/cassandra/thrift/CustomTHsHaServer.java
index 250a549..a199a27 100644
--- a/src/java/org/apache/cassandra/thrift/CustomTHsHaServer.java
+++ b/src/java/org/apache/cassandra/thrift/CustomTHsHaServer.java
@@ -30,6 +30,7 @@ import java.util.concurrent.RejectedExecutionException;
 import java.util.concurrent.SynchronousQueue;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.cassandra.utils.FBUtilities;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -378,7 +379,7 @@ public class CustomTHsHaServer extends TNonblockingServer
                                                                                .outputProtocolFactory(args.tProtocolFactory)
                                                                                .processor(args.processor);
             // Check for available processors in the system which will be equal to the IO
Threads.
-            return new CustomTHsHaServer(serverArgs, executorService, Runtime.getRuntime().availableProcessors());
+            return new CustomTHsHaServer(serverArgs, executorService, FBUtilities.getAvailableProcessors());
         }
     }
 }


Mime
View raw message