Merge branch 'cassandra-2.2' into cassandra-3.0

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

Branch: refs/heads/trunk
Commit: e99ee19950e764ca55331d7c814e965bef359a4f
Parents: 5861cd8 f0d1d75
Author: Josh McKenzie <jmcken...@apache.org>
Authored: Mon Jul 11 16:28:13 2016 -0400
Committer: Josh McKenzie <jmcken...@apache.org>
Committed: Mon Jul 11 16:28:22 2016 -0400

----------------------------------------------------------------------
 conf/cassandra.yaml                                       |  7 ++++++-
 src/java/org/apache/cassandra/config/Config.java          |  1 +
 .../org/apache/cassandra/config/DatabaseDescriptor.java   | 10 ++++++++++
 src/java/org/apache/cassandra/service/GCInspector.java    |  2 +-
 4 files changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e99ee199/conf/cassandra.yaml
----------------------------------------------------------------------
diff --cc conf/cassandra.yaml
index 4b92f64,4ad798a..09d2094
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@@ -924,21 -858,23 +924,26 @@@ inter_dc_tcp_nodelay: fals
  tracetype_query_ttl: 86400
  tracetype_repair_ttl: 604800
  
+ # By default, Cassandra logs GC Pauses greater than 200 ms at INFO level
+ # This threshold can be adjusted to minimize logging if necessary
+ # gc_log_threshold_in_ms: 200
+ 
  # GC Pauses greater than gc_warn_threshold_in_ms will be logged at WARN level
+ # If unset, all GC Pauses greater than gc_log_threshold_in_ms will log at
+ # INFO level
  # Adjust the threshold based on your application throughput requirement
- # By default, Cassandra logs GC Pauses greater than 200 ms at INFO level
 -# gc_warn_threshold_in_ms: 1000
 +gc_warn_threshold_in_ms: 1000
  
  # UDFs (user defined functions) are disabled by default.
 -# As of Cassandra 2.2, there is no security manager or anything else in place 
that
 -# prevents execution of evil code. CASSANDRA-9402 will fix this issue for 
Cassandra 3.0.
 -# This will inherently be backwards-incompatible with any 2.2 UDF that 
perform insecure
 -# operations such as opening a socket or writing to the filesystem.
 +# As of Cassandra 3.0 there is a sandbox in place that should prevent 
execution of evil code.
  enable_user_defined_functions: false
  
 +# Enables scripted UDFs (JavaScript UDFs).
 +# Java UDFs are always enabled, if enable_user_defined_functions is true.
 +# Enable this option to be able to use UDFs with "language javascript" or any 
custom JSR-223 provider.
 +# This option has no effect, if enable_user_defined_functions is false.
 +enable_scripted_user_defined_functions: false
 +
  # The default Windows kernel timer and scheduling resolution is 15.6ms for 
power conservation.
  # Lowering this value on Windows can provide much tighter latency and better 
throughput, however
  # some virtualized environments may see a negative performance impact from 
changing this setting

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e99ee199/src/java/org/apache/cassandra/config/Config.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/config/Config.java
index b49e14c,ede4560..2bd23b5
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@@ -265,8 -254,12 +265,9 @@@ public class Confi
      public volatile Long index_summary_capacity_in_mb;
      public volatile int index_summary_resize_interval_in_minutes = 60;
  
+     public int gc_log_threshold_in_ms = 200;
      public int gc_warn_threshold_in_ms = 0;
  
 -    private static final CsvPreference 
STANDARD_SURROUNDING_SPACES_NEED_QUOTES = new 
CsvPreference.Builder(CsvPreference.STANDARD_PREFERENCE)
 -                                                                              
                    .surroundingSpacesNeedQuotes(true).build();
 -
      // TTL for different types of trace events.
      public int tracetype_query_ttl = (int) TimeUnit.DAYS.toSeconds(1);
      public int tracetype_repair_ttl = (int) TimeUnit.DAYS.toSeconds(7);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e99ee199/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index 2083e42f,f1acfc4..100bcf4
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@@ -1934,51 -1801,16 +1939,56 @@@ public class DatabaseDescripto
          return conf.enable_user_defined_functions;
      }
  
 -    public static int getWindowsTimerInterval()
 +    public static boolean enableScriptedUserDefinedFunctions()
      {
 -        return conf.windows_timer_interval;
 +        return conf.enable_scripted_user_defined_functions;
 +    }
 +
 +    public static void enableScriptedUserDefinedFunctions(boolean 
enableScriptedUserDefinedFunctions)
 +    {
 +        conf.enable_scripted_user_defined_functions = 
enableScriptedUserDefinedFunctions;
 +    }
 +
 +    public static boolean enableUserDefinedFunctionsThreads()
 +    {
 +        return conf.enable_user_defined_functions_threads;
 +    }
 +
 +    public static long getUserDefinedFunctionWarnTimeout()
 +    {
 +        return conf.user_defined_function_warn_timeout;
 +    }
 +
 +    public static void setUserDefinedFunctionWarnTimeout(long 
userDefinedFunctionWarnTimeout)
 +    {
 +        conf.user_defined_function_warn_timeout = 
userDefinedFunctionWarnTimeout;
 +    }
 +
 +    public static long getUserDefinedFunctionFailTimeout()
 +    {
 +        return conf.user_defined_function_fail_timeout;
 +    }
 +
 +    public static void setUserDefinedFunctionFailTimeout(long 
userDefinedFunctionFailTimeout)
 +    {
 +        conf.user_defined_function_fail_timeout = 
userDefinedFunctionFailTimeout;
 +    }
 +
 +    public static Config.UserFunctionTimeoutPolicy 
getUserFunctionTimeoutPolicy()
 +    {
 +        return conf.user_function_timeout_policy;
 +    }
 +
 +    public static void 
setUserFunctionTimeoutPolicy(Config.UserFunctionTimeoutPolicy 
userFunctionTimeoutPolicy)
 +    {
 +        conf.user_function_timeout_policy = userFunctionTimeoutPolicy;
      }
  
+     public static long getGCLogThreshold()
+     {
+         return conf.gc_log_threshold_in_ms;
+     }
+ 
      public static long getGCWarnThreshold()
      {
          return conf.gc_warn_threshold_in_ms;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/e99ee199/src/java/org/apache/cassandra/service/GCInspector.java
----------------------------------------------------------------------

Reply via email to