Merge branch 'cassandra-2.2' into cassandra-3.0
Conflicts:
CHANGES.txt
src/java/org/apache/cassandra/config/Config.java
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/00264e85
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/00264e85
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/00264e85
Branch: refs/heads/trunk
Commit: 00264e854731aea93a8485b497b6f6fd9680f7d9
Parents: 0790e48 53d0449
Author: Joshua McKenzie <[email protected]>
Authored: Fri Sep 11 13:13:03 2015 -0400
Committer: Joshua McKenzie <[email protected]>
Committed: Fri Sep 11 13:13:03 2015 -0400
----------------------------------------------------------------------
CHANGES.txt | 1 +
NEWS.txt | 2 ++
conf/cassandra.yaml | 5 +++++
src/java/org/apache/cassandra/config/Config.java | 2 ++
.../apache/cassandra/config/DatabaseDescriptor.java | 11 +++++++++++
.../org/apache/cassandra/service/GCInspector.java | 16 +++++++++++-----
6 files changed, 32 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/00264e85/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 3397369,ffae4d9..d367b85
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -43,6 -9,11 +43,7 @@@ Merged from 2.2
* Fall back to 1/4 commitlog volume for commitlog_total_space on small disks
(CASSANDRA-10199)
Merged from 2.1:
+ * Added configurable warning threshold for GC duration (CASSANDRA-8907)
- * (cqlsh) Make cqlsh PEP8 Compliant (CASSANDRA-10066)
- * (cqlsh) Fix error when starting cqlsh with --debug (CASSANDRA-10282)
- * Scrub, Cleanup and Upgrade do not unmark compacting until all operations
- have completed, regardless of the occurence of exceptions (CASSANDRA-10274)
* Fix handling of streaming EOF (CASSANDRA-10206)
* Only check KeyCache when it is enabled
* Change streaming_socket_timeout_in_ms default to 1 hour (CASSANDRA-8611)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/00264e85/NEWS.txt
----------------------------------------------------------------------
diff --cc NEWS.txt
index 1af1bd5,198e8e9..4b35f71
--- a/NEWS.txt
+++ b/NEWS.txt
@@@ -13,32 -13,9 +13,34 @@@ restore snapshots created with the prev
'sstableloader' tool. You can upgrade the file format of your snapshots
using the provided 'sstableupgrade' tool.
+3.0
+===
-2.2.2
-=====
+New features
+------------
+ - Support for IN restrictions on any partition key component or clustering
key
+ as well as support for EQ and IN multicolumn restrictions has been added
to
+ UPDATE and DELETE statement.
+ - Support for single-column and multi-colum slice restrictions (>, >=, <=
and <)
+ has been added to DELETE statements
+ - nodetool rebuild_index accepts the index argument without
+ the redundant table name
+ - Materialized Views, which allow for server-side denormalization, is now
+ available. Materialized views provide an alternative to secondary indexes
+ for non-primary key queries, and perform much better for indexing high
+ cardinality columns.
+ See
http://www.datastax.com/dev/blog/new-in-cassandra-3-0-materialized-views
+ - Hinted handoff has been completely rewritten. Hints are now stored in
flat
+ files, with less overhead for storage and more efficient dispatch.
+ See CASSANDRA-6230 for full details.
+ - Option to not purge unrepaired tombstones. To avoid users having data
resurrected
+ if repair has not been run within gc_grace_seconds, an option has been
added to
+ only allow tombstones from repaired sstables to be purged. To enable,
set the
+ compaction option 'only_purge_repaired_tombstones':true but keep in mind
that if
+ you do not run repair for a long time, you will keep all tombstones
around which
+ can cause other problems.
++ - Enabled warning on GC taking longer than 1000ms. See
++ cassandra.yaml:gc_warn_threshold_in_ms
Upgrading
---------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/00264e85/conf/cassandra.yaml
----------------------------------------------------------------------
diff --cc conf/cassandra.yaml
index 28caa1e,ab8e8d1..f03a2f9
--- a/conf/cassandra.yaml
+++ b/conf/cassandra.yaml
@@@ -905,16 -853,18 +905,21 @@@ inter_dc_tcp_nodelay: fals
tracetype_query_ttl: 86400
tracetype_repair_ttl: 604800
+ # GC Pauses greater than gc_warn_threshold_in_ms will be logged at WARN 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/00264e85/src/java/org/apache/cassandra/config/Config.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/config/Config.java
index 164dab2,a8be5f4..bcd736c
--- a/src/java/org/apache/cassandra/config/Config.java
+++ b/src/java/org/apache/cassandra/config/Config.java
@@@ -247,6 -237,11 +247,8 @@@ public class Confi
public volatile Long index_summary_capacity_in_mb;
public volatile int index_summary_resize_interval_in_minutes = 60;
+ 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/00264e85/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/config/DatabaseDescriptor.java
index d87dde8,545ad05..ed220b8
--- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
+++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
@@@ -1885,48 -1780,14 +1890,54 @@@ 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 getGCWarnThreshold()
+ {
+ return conf.gc_warn_threshold_in_ms;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/cassandra/blob/00264e85/src/java/org/apache/cassandra/service/GCInspector.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/service/GCInspector.java
index 21ecdb0,3a4ec22..db71fc5
--- a/src/java/org/apache/cassandra/service/GCInspector.java
+++ b/src/java/org/apache/cassandra/service/GCInspector.java
@@@ -36,10 -39,9 +39,9 @@@ import com.sun.management.GcInfo
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
- import com.sun.management.GarbageCollectionNotificationInfo;
- import com.sun.management.GcInfo;
+ import org.apache.cassandra.config.DatabaseDescriptor;
-import org.apache.cassandra.io.sstable.SSTableDeletingTask;
+import org.apache.cassandra.db.lifecycle.LifecycleTransaction;
import org.apache.cassandra.utils.StatusLogger;
public class GCInspector implements NotificationListener, GCInspectorMXBean