Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 27659200B3B for ; Mon, 11 Jul 2016 22:45:31 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 25B0E160A87; Mon, 11 Jul 2016 20:45:31 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4ADB7160A7D for ; Mon, 11 Jul 2016 22:45:30 +0200 (CEST) Received: (qmail 75548 invoked by uid 500); 11 Jul 2016 20:45:29 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 75176 invoked by uid 99); 11 Jul 2016 20:45:29 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jul 2016 20:45:29 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CE04DE5720; Mon, 11 Jul 2016 20:45:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jmckenzie@apache.org To: commits@cassandra.apache.org Date: Mon, 11 Jul 2016 20:45:32 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [05/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0 archived-at: Mon, 11 Jul 2016 20:45:31 -0000 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/cassandra-3.9 Commit: e99ee19950e764ca55331d7c814e965bef359a4f Parents: 5861cd8 f0d1d75 Author: Josh McKenzie Authored: Mon Jul 11 16:28:13 2016 -0400 Committer: Josh McKenzie 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 ----------------------------------------------------------------------