cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1134461 - in /cassandra/trunk: src/java/org/apache/cassandra/db/ src/java/org/apache/cassandra/db/compaction/ test/unit/org/apache/cassandra/db/ test/unit/org/apache/cassandra/db/compaction/ test/unit/org/apache/cassandra/io/sstable/
Date Fri, 10 Jun 2011 22:15:00 GMT
Author: jbellis
Date: Fri Jun 10 22:14:59 2011
New Revision: 1134461

URL: http://svn.apache.org/viewvc?rev=1134461&view=rev
Log:
rename minor -> background, major -> maximal
patch by Alan Liang for CASSANDRA-1610

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
    cassandra/trunk/src/java/org/apache/cassandra/db/HintedHandOffManager.java
    cassandra/trunk/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
    cassandra/trunk/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/RemoveSuperColumnTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/TableTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/db/compaction/OneCompactionTest.java
    cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=1134461&r1=1134460&r2=1134461&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java Fri Jun 10 22:14:59
2011
@@ -920,7 +920,7 @@ public class ColumnFamilyStore implement
     {
         assert sstable.getColumnFamilyName().equals(columnFamily);
         data.addStreamedSSTable(sstable);
-        CompactionManager.instance.submitMinorIfNeeded(this);
+        CompactionManager.instance.submitBackground(this);
     }
 
     /*
@@ -985,7 +985,7 @@ public class ColumnFamilyStore implement
     void replaceFlushed(Memtable memtable, SSTableReader sstable)
     {
         data.replaceFlushed(memtable, sstable);
-        CompactionManager.instance.submitMinorIfNeeded(this);
+        CompactionManager.instance.submitBackground(this);
     }
 
     public boolean isInvalid()
@@ -1722,7 +1722,7 @@ public class ColumnFamilyStore implement
 
     public void forceMajorCompaction() throws InterruptedException, ExecutionException
     {
-        CompactionManager.instance.performMajor(this);
+        CompactionManager.instance.performMaximal(this);
     }
 
     public void invalidateRowCache()

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/HintedHandOffManager.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/HintedHandOffManager.java?rev=1134461&r1=1134460&r2=1134461&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/HintedHandOffManager.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/HintedHandOffManager.java Fri Jun 10
22:14:59 2011
@@ -226,7 +226,7 @@ public class HintedHandOffManager implem
                     logger_.info("Deleting any stored hints for " + ipaddr);
                     rm.apply();
                     hintStore.forceFlush();
-                    CompactionManager.instance.submitMajor(hintStore, Integer.MAX_VALUE);
+                    CompactionManager.instance.submitMaximal(hintStore, Integer.MAX_VALUE);
                 }
                 catch (Exception e)
                 {
@@ -365,7 +365,7 @@ public class HintedHandOffManager implem
             hintStore.forceFlush();
             try
             {
-                CompactionManager.instance.submitMajor(hintStore, Integer.MAX_VALUE).get();
+                CompactionManager.instance.submitMaximal(hintStore, Integer.MAX_VALUE).get();
             }
             catch (Exception e)
             {

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/compaction/CompactionManager.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/compaction/CompactionManager.java?rev=1134461&r1=1134460&r2=1134461&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/compaction/CompactionManager.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/compaction/CompactionManager.java Fri
Jun 10 22:14:59 2011
@@ -96,7 +96,7 @@ public class CompactionManager implement
      * It's okay to over-call (within reason) since the compactions are single-threaded,
      * and if a call is unnecessary, it will just be no-oped in the bucketing phase.
      */
-    public Future<Integer> submitMinorIfNeeded(final ColumnFamilyStore cfs)
+    public Future<Integer> submitBackground(final ColumnFamilyStore cfs)
     {
         Callable<Integer> callable = new Callable<Integer>()
         {
@@ -227,12 +227,12 @@ public class CompactionManager implement
         executor.submit(runnable).get();
     }
 
-    public void performMajor(final ColumnFamilyStore cfStore) throws InterruptedException,
ExecutionException
+    public void performMaximal(final ColumnFamilyStore cfStore) throws InterruptedException,
ExecutionException
     {
-        submitMajor(cfStore, getDefaultGcBefore(cfStore)).get();
+        submitMaximal(cfStore, getDefaultGcBefore(cfStore)).get();
     }
 
-    public Future<Object> submitMajor(final ColumnFamilyStore cfStore, final int gcBefore)
+    public Future<Object> submitMaximal(final ColumnFamilyStore cfStore, final int
gcBefore)
     {
         Callable<Object> callable = new Callable<Object>()
         {

Modified: cassandra/trunk/src/java/org/apache/cassandra/db/compaction/CompactionTask.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/db/compaction/CompactionTask.java?rev=1134461&r1=1134460&r2=1134461&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/db/compaction/CompactionTask.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/db/compaction/CompactionTask.java Fri Jun
10 22:14:59 2011
@@ -173,7 +173,7 @@ public class CompactionTask extends Abst
         cfs.replaceCompactedSSTables(sstables, Arrays.asList(ssTable));
         for (Entry<DecoratedKey, Long> entry : cachedKeys.entrySet()) // empty if preheat
is off
             ssTable.cacheKey(entry.getKey(), entry.getValue());
-        CompactionManager.instance.submitMinorIfNeeded(cfs);
+        CompactionManager.instance.submitBackground(cfs);
 
         long dTime = System.currentTimeMillis() - startTime;
         long startsize = SSTable.getTotalBytes(sstables);

Modified: cassandra/trunk/test/unit/org/apache/cassandra/db/RemoveSuperColumnTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/db/RemoveSuperColumnTest.java?rev=1134461&r1=1134460&r2=1134461&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/db/RemoveSuperColumnTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/db/RemoveSuperColumnTest.java Fri Jun 10
22:14:59 2011
@@ -64,7 +64,7 @@ public class RemoveSuperColumnTest exten
         store.forceBlockingFlush();
         validateRemoveTwoSources(dk);
 
-        CompactionManager.instance.performMajor(store);
+        CompactionManager.instance.performMaximal(store);
         assertEquals(1, store.getSSTables().size());
         validateRemoveCompacted(dk);
     }
@@ -154,7 +154,7 @@ public class RemoveSuperColumnTest exten
         store.forceBlockingFlush();
         validateRemoveWithNewData(dk);
 
-        CompactionManager.instance.performMajor(store);
+        CompactionManager.instance.performMaximal(store);
         assertEquals(1, store.getSSTables().size());
         validateRemoveWithNewData(dk);
     }

Modified: cassandra/trunk/test/unit/org/apache/cassandra/db/TableTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/db/TableTest.java?rev=1134461&r1=1134460&r2=1134461&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/db/TableTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/db/TableTest.java Fri Jun 10 22:14:59 2011
@@ -400,7 +400,7 @@ public class TableTest extends CleanupHe
         // compact so we have a big row with more than the minimum index count
         if (cfStore.getSSTables().size() > 1)
         {
-            CompactionManager.instance.performMajor(cfStore);
+            CompactionManager.instance.performMaximal(cfStore);
         }
         // verify that we do indeed have multiple index entries
         SSTableReader sstable = cfStore.getSSTables().iterator().next();

Modified: cassandra/trunk/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java?rev=1134461&r1=1134460&r2=1134461&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
(original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/db/compaction/CompactionsPurgeTest.java
Fri Jun 10 22:14:59 2011
@@ -83,7 +83,7 @@ public class CompactionsPurgeTest extend
         cfs.forceBlockingFlush();
 
         // major compact and test that all columns but the resurrected one is completely
gone
-        CompactionManager.instance.submitMajor(cfs, Integer.MAX_VALUE).get();
+        CompactionManager.instance.submitMaximal(cfs, Integer.MAX_VALUE).get();
         cfs.invalidateCachedRow(key);
         ColumnFamily cf = cfs.getColumnFamily(QueryFilter.getIdentityFilter(key, new QueryPath(cfName)));
         assertColumns(cf, "5");

Modified: cassandra/trunk/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java?rev=1134461&r1=1134460&r2=1134461&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/db/compaction/CompactionsTest.java Fri
Jun 10 22:14:59 2011
@@ -76,7 +76,7 @@ public class CompactionsTest extends Cle
         {
             ArrayList<Future<Integer>> compactions = new ArrayList<Future<Integer>>();
             for (int i = 0; i < 10; i++)
-                compactions.add(CompactionManager.instance.submitMinorIfNeeded(store));
+                compactions.add(CompactionManager.instance.submitBackground(store));
             // another compaction attempt will be launched in the background by
             // each completing compaction: not much we can do to control them here
             boolean progress = false;
@@ -88,7 +88,7 @@ public class CompactionsTest extends Cle
         }
         if (store.getSSTables().size() > 1)
         {
-            CompactionManager.instance.performMajor(store);
+            CompactionManager.instance.performMaximal(store);
         }
         assertEquals(inserted.size(), Util.getRangeSlice(store).size());
     }
@@ -118,7 +118,7 @@ public class CompactionsTest extends Cle
         }
 
         // Force compaction. Since each row is in only one sstable, we will be using EchoedRow.
-        CompactionManager.instance.performMajor(store);
+        CompactionManager.instance.performMaximal(store);
 
         // Now assert we do have the two keys
         assertEquals(4, Util.getRangeSlice(store).size());

Modified: cassandra/trunk/test/unit/org/apache/cassandra/db/compaction/OneCompactionTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/db/compaction/OneCompactionTest.java?rev=1134461&r1=1134460&r2=1134461&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/db/compaction/OneCompactionTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/db/compaction/OneCompactionTest.java Fri
Jun 10 22:14:59 2011
@@ -57,7 +57,7 @@ public class OneCompactionTest extends C
             store.forceBlockingFlush();
             assertEquals(inserted.size(), Util.getRangeSlice(store).size());
         }
-        CompactionManager.instance.performMajor(store);
+        CompactionManager.instance.performMaximal(store);
         assertEquals(1, store.getSSTables().size());
     }
 

Modified: cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java?rev=1134461&r1=1134460&r2=1134461&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/io/sstable/SSTableReaderTest.java Fri Jun
10 22:14:59 2011
@@ -70,7 +70,7 @@ public class SSTableReaderTest extends C
             rm.apply();
         }
         store.forceBlockingFlush();
-        CompactionManager.instance.performMajor(store);
+        CompactionManager.instance.performMaximal(store);
 
         List<Range> ranges = new ArrayList<Range>();
         // 1 key
@@ -111,7 +111,7 @@ public class SSTableReaderTest extends C
             rm.apply();
         }
         store.forceBlockingFlush();
-        CompactionManager.instance.performMajor(store);
+        CompactionManager.instance.performMaximal(store);
 
         // check that all our keys are found correctly
         SSTableReader sstable = store.getSSTables().iterator().next();
@@ -168,7 +168,7 @@ public class SSTableReaderTest extends C
             rm.apply();
         }
         store.forceBlockingFlush();
-        CompactionManager.instance.performMajor(store);
+        CompactionManager.instance.performMaximal(store);
 
         SSTableReader sstable = store.getSSTables().iterator().next();
         long p2 = sstable.getPosition(k(2), SSTableReader.Operator.EQ);



Mime
View raw message