cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc...@apache.org
Subject [3/4] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0
Date Mon, 10 Aug 2015 07:35:09 GMT
Merge branch 'cassandra-2.2' into cassandra-3.0

Conflicts:
	NEWS.txt
	src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
	test/unit/org/apache/cassandra/db/compaction/CompactionsCQLTest.java


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

Branch: refs/heads/trunk
Commit: 2dfcb221c6db589c1e91aa122fd727f417098568
Parents: 929438b 2dd8101
Author: Marcus Eriksson <marcuse@apache.org>
Authored: Mon Aug 10 09:33:54 2015 +0200
Committer: Marcus Eriksson <marcuse@apache.org>
Committed: Mon Aug 10 09:33:54 2015 +0200

----------------------------------------------------------------------
 NEWS.txt                                                |  4 +++-
 src/java/org/apache/cassandra/db/ColumnFamilyStore.java | 12 ++++++------
 .../org/apache/cassandra/db/ColumnFamilyStoreMBean.java | 12 ++++++------
 .../cassandra/db/compaction/CompactionsCQLTest.java     | 11 +++++------
 4 files changed, 20 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/2dfcb221/NEWS.txt
----------------------------------------------------------------------
diff --cc NEWS.txt
index 5a690bd,d0a6d9d..4a59553
--- a/NEWS.txt
+++ b/NEWS.txt
@@@ -13,56 -13,6 +13,56 @@@ restore snapshots created with the prev
  'sstableloader' tool. You can upgrade the file format of your snapshots
  using the provided 'sstableupgrade' tool.
  
 +3.0
 +===
 +
 +New features
 +------------
 +   - 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
 +
 +
 +Upgrading
 +---------
 +   - 3.0 requires Java 8u20 or later.
 +   - The default JVM GC has been changed to G1GC.
 +   - The default JVM flag -XX:+PerfDisableSharedMem will cause the following tools JVM
 +     to stop working: jps, jstack, jinfo, jmc, jcmd as well as 3rd party tools like Jolokia.
 +     If you wish to use these tools you can comment this flag out in cassandra-env.{sh,ps1}
 +   - New write stages have been added for batchlog and materialized view mutations
 +     you can set their size in cassandra.yaml
 +   - User defined functions are now executed in a sandbox.
 +     To use UDFs and UDAs, you have to enable them in cassandra.yaml.
 +   - New SSTable version 'la' with improved bloom-filter false-positive handling
 +     compared to previous version 'ka' used in 2.2 and 2.1. Running sstableupgrade
 +     is not necessary but recommended.
 +   - Before upgrading to 3.0, make sure that your cluster is in complete agreement
 +     (schema versions outputted by `nodetool describecluster` are all the same).
 +   - Schema metadata is now stored in the new `system_schema` keyspace, and
 +     legacy `system.schema_*` tables are now gone; see CASSANDRA-6717 for details.
 +   - Pig's CassandraStorage has been removed. Use CqlNativeStorage instead.
 +   - Hadoop BulkOutputFormat and BulkRecordWriter have been removed; use
 +     CqlBulkOutputFormat and CqlBulkRecordWriter instead.
 +   - Hadoop ColumnFamilyInputFormat and ColumnFamilyOutputFormat have been removed;
 +     use CqlInputFormat and CqlOutputFormat instead.
 +   - Hadoop ColumnFamilyRecordReader and ColumnFamilyRecordWriter have been removed;
 +     use CqlRecordReader and CqlRecordWriter instead.
 +   - hinted_handoff_enabled in cassandra.yaml no longer supports a list of data centers.
 +     To specify a list of excluded data centers when hinted_handoff_enabled is set to true,
 +     use hinted_handoff_disabled_datacenters, see CASSANDRA-9035 for details.
 +   - The `sstable_compression` and `chunk_length_kb` compression options have been deprecated.
 +     The new options are `class` and `chunk_length_in_kb`. Disabling compression should
now
 +     be done by setting the new option `enabled` to `false`.
 +   - Only map syntax is now allowed for caching options. ALL/NONE/KEYS_ONLY/ROWS_ONLY syntax
 +     has been deprecated since 2.1.0 and is being removed in 3.0.0.
 +   - Batchlog entries are now stored in a new table - system.batches.
 +     The old one has been deprecated.
 +   - JMX methods set/getCompactionStrategyClass have been removed, use
-      set/getLocalCompactionStrategy or set/getLocalCompactionStrategyJson instead.
++     set/getCompactionParameters or set/getCompactionParametersJson instead.
 +
  2.2
  ===
  
@@@ -161,8 -111,9 +161,10 @@@ Upgradin
      - Commit log files are no longer recycled by default, due to negative
        performance implications. This can be enabled again with the 
        commitlog_segment_recycling option in your cassandra.yaml 
+     - JMX methods set/getCompactionStrategyClass have been deprecated, use
+       set/getCompactionParameters/set/getCompactionParametersJson instead
  
 +
  2.1.8
  =====
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2dfcb221/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index 4ae6694,482e3ee..c89f16a
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@@ -274,9 -287,29 +274,9 @@@ public class ColumnFamilyStore implemen
          }
      }
  
-     public Map<String, String> getLocalCompactionStrategy()
+     public Map<String, String> getCompactionParameters()
      {
 -        Map<String, String> options = new HashMap<>(compactionStrategyWrapper.options);
 -        options.put("class", compactionStrategyWrapper.getName());
 -        return options;
 -    }
 -
 -    public void setCompactionStrategyClass(String compactionStrategyClass)
 -    {
 -        try
 -        {
 -            metadata.compactionStrategyClass = CFMetaData.createCompactionStrategy(compactionStrategyClass);
 -            compactionStrategyWrapper.maybeReloadCompactionStrategy(metadata);
 -        }
 -        catch (ConfigurationException e)
 -        {
 -            throw new IllegalArgumentException(e.getMessage());
 -        }
 -    }
 -
 -    public String getCompactionStrategyClass()
 -    {
 -        return metadata.compactionStrategyClass.getName();
 +        return compactionStrategyManager.getCompactionParams().asMap();
      }
  
      public Map<String,String> getCompressionParameters()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2dfcb221/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
index 84c6dd1,b4511d0..c900442
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStoreMBean.java
@@@ -86,8 -83,20 +86,8 @@@ public interface ColumnFamilyStoreMBea
       *
       * @param options compaction options map
       */
-     public void setLocalCompactionStrategy(Map<String, String> options);
-     public Map<String, String> getLocalCompactionStrategy();
+     public void setCompactionParameters(Map<String, String> options);
+     public Map<String, String> getCompactionParameters();
 -    /**
 -     * Sets the compaction strategy by class name
 -     * @param className the name of the compaction strategy class
 -     */
 -    @Deprecated
 -    public void setCompactionStrategyClass(String className);
 -
 -    /**
 -     * Gets the compaction strategy class name
 -     */
 -    @Deprecated
 -    public String getCompactionStrategyClass();
  
      /**
       * Get the compression parameters

http://git-wip-us.apache.org/repos/asf/cassandra/blob/2dfcb221/test/unit/org/apache/cassandra/db/compaction/CompactionsCQLTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/db/compaction/CompactionsCQLTest.java
index 63b21df,46ade76..7aa47c0
--- a/test/unit/org/apache/cassandra/db/compaction/CompactionsCQLTest.java
+++ b/test/unit/org/apache/cassandra/db/compaction/CompactionsCQLTest.java
@@@ -151,8 -151,9 +151,8 @@@ public class CompactionsCQLTest extend
          createTable("CREATE TABLE %s (id text PRIMARY KEY)");
          Map<String, String> localOptions = new HashMap<>();
          localOptions.put("class", "DateTieredCompactionStrategy");
-         getCurrentColumnFamilyStore().setLocalCompactionStrategy(localOptions);
+         getCurrentColumnFamilyStore().setCompactionParameters(localOptions);
 -        WrappingCompactionStrategy wrappingCompactionStrategy = (WrappingCompactionStrategy)
getCurrentColumnFamilyStore().getCompactionStrategy();
 -        assertTrue(verifyStrategies(wrappingCompactionStrategy, DateTieredCompactionStrategy.class));
 +        assertTrue(verifyStrategies(getCurrentColumnFamilyStore().getCompactionStrategyManager(),
DateTieredCompactionStrategy.class));
          // altering something non-compaction related
          execute("ALTER TABLE %s WITH gc_grace_seconds = 1000");
          // should keep the local compaction strat
@@@ -171,13 -172,13 +171,13 @@@
          Map<String, String> localOptions = new HashMap<>();
          localOptions.put("class", "DateTieredCompactionStrategy");
          localOptions.put("enabled", "false");
-         getCurrentColumnFamilyStore().setLocalCompactionStrategy(localOptions);
+         getCurrentColumnFamilyStore().setCompactionParameters(localOptions);
 -        assertFalse(getCurrentColumnFamilyStore().getCompactionStrategy().isEnabled());
 +        assertFalse(getCurrentColumnFamilyStore().getCompactionStrategyManager().isEnabled());
          localOptions.clear();
          localOptions.put("class", "DateTieredCompactionStrategy");
          // localOptions.put("enabled", "true"); - this is default!
-         getCurrentColumnFamilyStore().setLocalCompactionStrategy(localOptions);
+         getCurrentColumnFamilyStore().setCompactionParameters(localOptions);
 -        assertTrue(getCurrentColumnFamilyStore().getCompactionStrategy().isEnabled());
 +        assertTrue(getCurrentColumnFamilyStore().getCompactionStrategyManager().isEnabled());
      }
  
  
@@@ -189,11 -190,11 +189,10 @@@
          localOptions.put("class", "DateTieredCompactionStrategy");
  
          getCurrentColumnFamilyStore().disableAutoCompaction();
 -        assertFalse(getCurrentColumnFamilyStore().getCompactionStrategy().isEnabled());
 +        assertFalse(getCurrentColumnFamilyStore().getCompactionStrategyManager().isEnabled());
  
-         getCurrentColumnFamilyStore().setLocalCompactionStrategy(localOptions);
+         getCurrentColumnFamilyStore().setCompactionParameters(localOptions);
 -        assertTrue(getCurrentColumnFamilyStore().getCompactionStrategy().isEnabled());
 -
 +        assertTrue(getCurrentColumnFamilyStore().getCompactionStrategyManager().isEnabled());
- 
      }
  
  
@@@ -205,13 -206,13 +204,13 @@@
          Map<String, String> localOptions = new HashMap<>();
          localOptions.put("class","SizeTieredCompactionStrategy");
          localOptions.put("sstable_size_in_mb","1234"); // not for STCS
-         getCurrentColumnFamilyStore().setLocalCompactionStrategy(localOptions);
+         getCurrentColumnFamilyStore().setCompactionParameters(localOptions);
      }
  
 -    public boolean verifyStrategies(WrappingCompactionStrategy wrappingStrategy, Class<?
extends AbstractCompactionStrategy> expected)
 +    public boolean verifyStrategies(CompactionStrategyManager manager, Class<? extends
AbstractCompactionStrategy> expected)
      {
          boolean found = false;
 -        for (AbstractCompactionStrategy actualStrategy : wrappingStrategy.getWrappedStrategies())
 +        for (AbstractCompactionStrategy actualStrategy : manager.getStrategies())
          {
              if (!actualStrategy.getClass().equals(expected))
                  return false;


Mime
View raw message