You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by db...@apache.org on 2013/10/18 03:53:05 UTC

git commit: fix bad merge

Updated Branches:
  refs/heads/cassandra-2.0 229da3725 -> f19610c1a


fix bad merge


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

Branch: refs/heads/cassandra-2.0
Commit: f19610c1a9357e217d156908386b7c04c865758c
Parents: 229da37
Author: Dave Brosius <db...@mebigfatguy.com>
Authored: Thu Oct 17 21:50:46 2013 -0400
Committer: Dave Brosius <db...@mebigfatguy.com>
Committed: Thu Oct 17 21:50:46 2013 -0400

----------------------------------------------------------------------
 .../compaction/LeveledCompactionStrategy.java   | 33 ++++++--------------
 1 file changed, 10 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/f19610c1/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
index f5a60e0..e992003 100644
--- a/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
+++ b/src/java/org/apache/cassandra/db/compaction/LeveledCompactionStrategy.java
@@ -54,33 +54,20 @@ public class LeveledCompactionStrategy extends AbstractCompactionStrategy implem
         super(cfs, options);
         int configuredMaxSSTableSize = 160;
         SizeTieredCompactionStrategyOptions localOptions = new SizeTieredCompactionStrategyOptions(options);
-        if (options.containsKey(SSTABLE_SIZE_OPTION))
-        {
-            configuredMaxSSTableSize = Integer.parseInt(options.get(SSTABLE_SIZE_OPTION));
-            if (configuredMaxSSTableSize >= 1000)
-            {
-<<<<<<< HEAD
-                // Yes, people have done this
-                logger.warn("Max sstable size of {}MB is configured; having a unit of compaction this large is probably a bad idea", configuredMaxSSTableSize);
-||||||| merged common ancestors
-                configuredMaxSSTableSize = Integer.parseInt(options.get(SSTABLE_SIZE_OPTION));
-                if (configuredMaxSSTableSize >= 1000)
-                {
-                    // Yes, people have done this
-                    logger.warn("Max sstable size of {}MB is configured; having a unit of compaction this large is probably a bad idea", configuredMaxSSTableSize);
-                }
-=======
-                configuredMaxSSTableSize = Integer.parseInt(options.get(SSTABLE_SIZE_OPTION));
-                if (!Boolean.getBoolean("cassandra.tolerate_sstable_size"))
-                {
+        if (options != null)
+        {             
+            if (options.containsKey(SSTABLE_SIZE_OPTION))             
+            {                 
+                configuredMaxSSTableSize = Integer.parseInt(options.get(SSTABLE_SIZE_OPTION));                 
+                if (!Boolean.getBoolean("cassandra.tolerate_sstable_size"))                 
+                {                     
                     if (configuredMaxSSTableSize >= 1000)
                         logger.warn("Max sstable size of {}MB is configured for {}.{}; having a unit of compaction this large is probably a bad idea",
-                                    configuredMaxSSTableSize, cfs.table.name, cfs.getColumnFamilyName());
-                    if (configuredMaxSSTableSize < 50)
+                                configuredMaxSSTableSize, cfs.name, cfs.getColumnFamilyName());
+                    if (configuredMaxSSTableSize < 50)  
                         logger.warn("Max sstable size of {}MB is configured for {}.{}.  Testing done for CASSANDRA-5727 indicates that performance improves up to 160MB",
-                                    configuredMaxSSTableSize, cfs.table.name, cfs.getColumnFamilyName());
+                                configuredMaxSSTableSize, cfs.name, cfs.getColumnFamilyName());
                 }
->>>>>>> cassandra-1.2
             }
         }
         maxSSTableSizeInMB = configuredMaxSSTableSize;