From 566799f567b319fdc62c94adfb8ffe4b96085649 Mon Sep 17 00:00:00 2001 From: Sylvain Lebresne Date: Wed, 7 Oct 2015 10:45:40 +0200 Subject: [PATCH] Remove (unsupported) offheap_objects option patch by slebresne; reviewed by aweisberg for CASSANDRA-10437 The 'objects offheap' allocator is currently not implemented for Cassandra 3.0. The option will be re-introduced by CASSANDRA-9472 in a future release but in the meantime, the patch properly remove the (now broken) option. --- NEWS.txt | 2 ++ conf/cassandra.yaml | 1 - src/java/org/apache/cassandra/config/DatabaseDescriptor.java | 3 ++- test/conf/cassandra_pig.yaml | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NEWS.txt b/NEWS.txt index a7e56eca70..18d61a3ccf 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -44,6 +44,8 @@ New features Upgrading --------- + - The 'memtable_allocation_type: offheap_objects' option has been removed. It should + be re-introduced in a future release and you can follow CASSANDRA-9472 to know more. - The LIMIT clause applies now only to the number of rows returned to the user, not to the number of row queried. By consequence, queries using aggregates will not be impacted by the LIMIT clause anymore. diff --git a/conf/cassandra.yaml b/conf/cassandra.yaml index 4fd249fa87..33ca4a89f3 100644 --- a/conf/cassandra.yaml +++ b/conf/cassandra.yaml @@ -403,7 +403,6 @@ concurrent_materialized_view_writes: 32 # Options are: # heap_buffers: on heap nio buffers # offheap_buffers: off heap (direct) nio buffers -# offheap_objects: native memory, eliminating nio buffer heap overhead memtable_allocation_type: heap_buffers # Total space to use for commit logs on disk. diff --git a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java index 7c062a1a4b..ccc3dd1483 100644 --- a/src/java/org/apache/cassandra/config/DatabaseDescriptor.java +++ b/src/java/org/apache/cassandra/config/DatabaseDescriptor.java @@ -1824,7 +1824,8 @@ public class DatabaseDescriptor } return new SlabPool(heapLimit, offHeapLimit, conf.memtable_cleanup_threshold, new ColumnFamilyStore.FlushLargestColumnFamily()); case offheap_objects: - return new NativePool(heapLimit, offHeapLimit, conf.memtable_cleanup_threshold, new ColumnFamilyStore.FlushLargestColumnFamily()); + throw new ConfigurationException("offheap_objects are not available in 3.0. They should be re-introduced in a future release, see https://issues.apache.org/jira/browse/CASSANDRA-9472 for details"); + // return new NativePool(heapLimit, offHeapLimit, conf.memtable_cleanup_threshold, new ColumnFamilyStore.FlushLargestColumnFamily()); default: throw new AssertionError(); } diff --git a/test/conf/cassandra_pig.yaml b/test/conf/cassandra_pig.yaml index 286434b9b5..ce71410992 100644 --- a/test/conf/cassandra_pig.yaml +++ b/test/conf/cassandra_pig.yaml @@ -3,7 +3,7 @@ # Consider the effects on 'o.a.c.i.s.LegacySSTableTest' before changing schemas in this file. # cluster_name: Test Cluster -memtable_allocation_type: offheap_objects +memtable_allocation_type: heap_buffers commitlog_sync: batch commitlog_sync_batch_window_in_ms: 1.0 commitlog_segment_size_in_mb: 5