cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1096805 - in /cassandra/branches/cassandra-0.7: ./ src/java/org/apache/cassandra/db/ src/java/org/apache/cassandra/gms/ src/java/org/apache/cassandra/service/
Date Tue, 26 Apr 2011 17:11:01 GMT
Author: jbellis
Date: Tue Apr 26 17:11:00 2011
New Revision: 1096805

URL: http://svn.apache.org/viewvc?rev=1096805&view=rev
Log:
movegossip heartbeat back to its own thread
patch by jbellis; reviewed by slebresne for CASSANDRA-2554

Modified:
    cassandra/branches/cassandra-0.7/CHANGES.txt
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/HintedHandOffManager.java
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Table.java
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/gms/Gossiper.java
    cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/StorageService.java

Modified: cassandra/branches/cassandra-0.7/CHANGES.txt
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/CHANGES.txt?rev=1096805&r1=1096804&r2=1096805&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/CHANGES.txt (original)
+++ cassandra/branches/cassandra-0.7/CHANGES.txt Tue Apr 26 17:11:00 2011
@@ -1,5 +1,6 @@
 0.7.6
  * force GC to reclaim disk space on flush, if necessary (CASSANDRA-2404)
+ * move gossip heartbeat back to its own thread (CASSANDRA-2554)
 
 
 0.7.5

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=1096805&r1=1096804&r2=1096805&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
(original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
Tue Apr 26 17:11:00 2011
@@ -576,10 +576,10 @@ public class ColumnFamilyStore implement
                     submitRowCacheWrite();
                 }
             };
-            saveRowCacheTask = StorageService.scheduledTasks.scheduleWithFixedDelay(runnable,
-                                                                                    rowCacheSavePeriodInSeconds,
-                                                                                    rowCacheSavePeriodInSeconds,
-                                                                                    TimeUnit.SECONDS);
+            saveRowCacheTask = StorageService.tasks.scheduleWithFixedDelay(runnable,
+                                                                           rowCacheSavePeriodInSeconds,
+                                                                           rowCacheSavePeriodInSeconds,
+                                                                           TimeUnit.SECONDS);
         }
 
         if (saveKeyCacheTask != null)
@@ -596,10 +596,10 @@ public class ColumnFamilyStore implement
                     submitKeyCacheWrite();
                 }
             };
-            saveKeyCacheTask = StorageService.scheduledTasks.scheduleWithFixedDelay(runnable,
-                                                                                    keyCacheSavePeriodInSeconds,
-                                                                                    keyCacheSavePeriodInSeconds,
-                                                                                    TimeUnit.SECONDS);
+            saveKeyCacheTask = StorageService.tasks.scheduleWithFixedDelay(runnable,
+                                                                           keyCacheSavePeriodInSeconds,
+                                                                           keyCacheSavePeriodInSeconds,
+                                                                           TimeUnit.SECONDS);
         }
     }
 

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/HintedHandOffManager.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/HintedHandOffManager.java?rev=1096805&r1=1096804&r2=1096805&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/HintedHandOffManager.java
(original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/HintedHandOffManager.java
Tue Apr 26 17:11:00 2011
@@ -218,7 +218,7 @@ public class HintedHandOffManager implem
                 }
             }
         };
-        StorageService.scheduledTasks.execute(runnable);
+        StorageService.tasks.execute(runnable);
     }
 
     private static boolean pagingFinished(ColumnFamily hintColumnFamily, ByteBuffer startColumn)

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Table.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Table.java?rev=1096805&r1=1096804&r2=1096805&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Table.java (original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/db/Table.java Tue Apr 26
17:11:00 2011
@@ -255,7 +255,7 @@ public class Table
                 }
             }
         };
-        flushTask = StorageService.scheduledTasks.scheduleWithFixedDelay(runnable, 10, 10,
TimeUnit.SECONDS);
+        flushTask = StorageService.tasks.scheduleWithFixedDelay(runnable, 10, 10, TimeUnit.SECONDS);
     }
 
     public void createReplicationStrategy(KSMetaData ksm) throws ConfigurationException

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/gms/Gossiper.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/gms/Gossiper.java?rev=1096805&r1=1096804&r2=1096805&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/gms/Gossiper.java (original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/gms/Gossiper.java Tue Apr
26 17:11:00 2011
@@ -26,6 +26,7 @@ import java.util.*;
 import java.util.Map.Entry;
 import java.util.concurrent.*;
 
+import org.apache.cassandra.concurrent.RetryingScheduledThreadPoolExecutor;
 import org.apache.cassandra.utils.FBUtilities;
 import org.cliffc.high_scale_lib.NonBlockingHashMap;
 import org.slf4j.Logger;
@@ -51,6 +52,7 @@ public class Gossiper implements IFailur
 {
     static final ApplicationState[] STATES = ApplicationState.values();
     private ScheduledFuture<?> scheduledGossipTask;
+    private static final RetryingScheduledThreadPoolExecutor executor = new RetryingScheduledThreadPoolExecutor("GossipTasks");
 
     private class GossipTask implements Runnable
     {
@@ -909,10 +911,10 @@ public class Gossiper implements IFailur
         //notify snitches that Gossiper is about to start
         DatabaseDescriptor.getEndpointSnitch().gossiperStarting();
 
-        scheduledGossipTask = StorageService.scheduledTasks.scheduleWithFixedDelay(new GossipTask(),
-                                                                                   Gossiper.intervalInMillis_,
-                                                                                   Gossiper.intervalInMillis_,
-                                                                                   TimeUnit.MILLISECONDS);
+        scheduledGossipTask = executor.scheduleWithFixedDelay(new GossipTask(),
+                                                              Gossiper.intervalInMillis_,
+                                                              Gossiper.intervalInMillis_,
+                                                              TimeUnit.MILLISECONDS);
     }
 
     /**

Modified: cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/StorageService.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/StorageService.java?rev=1096805&r1=1096804&r2=1096805&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/StorageService.java
(original)
+++ cassandra/branches/cassandra-0.7/src/java/org/apache/cassandra/service/StorageService.java
Tue Apr 26 17:11:00 2011
@@ -146,12 +146,12 @@ public class StorageService implements I
 
 
     /**
-     * This pool is used for periodic short time execution tasks.
+     * This pool is used for periodic short (sub-second) tasks.
      */
      public static final RetryingScheduledThreadPoolExecutor scheduledTasks = new RetryingScheduledThreadPoolExecutor("ScheduledTasks");
 
     /**
-     * This pool is used by tasks that can have long execution, (and usually are non periodic).
+     * This pool is used by tasks that can have longer execution times, and usually are non
periodic.
      */
     public static final RetryingScheduledThreadPoolExecutor tasks = new RetryingScheduledThreadPoolExecutor("NonPeriodicTasks");
 



Mime
View raw message