cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r897238 - in /incubator/cassandra/trunk/src/java/org/apache/cassandra: db/CompactionManager.java db/HintedHandOffManager.java dht/BootStrapper.java io/DeletionService.java io/SSTableReader.java
Date Fri, 08 Jan 2010 15:58:58 GMT
Author: jbellis
Date: Fri Jan  8 15:58:38 2010
New Revision: 897238

URL: http://svn.apache.org/viewvc?rev=897238&view=rev
Log:
assign names to threads that do not have one.  patch by jbellis

Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CompactionManager.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/HintedHandOffManager.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/BootStrapper.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/io/DeletionService.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/io/SSTableReader.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CompactionManager.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CompactionManager.java?rev=897238&r1=897237&r2=897238&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CompactionManager.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CompactionManager.java Fri
Jan  8 15:58:38 2010
@@ -29,6 +29,7 @@
 import org.apache.log4j.Logger;
 
 import org.apache.cassandra.concurrent.DebuggableThreadPoolExecutor;
+import org.apache.cassandra.concurrent.NamedThreadFactory;
 import org.apache.cassandra.dht.Range;
 import org.apache.cassandra.io.*;
 import org.apache.cassandra.config.DatabaseDescriptor;
@@ -71,6 +72,7 @@
 
     private CompactionExecutor executor = new CompactionExecutor();
     private Map<ColumnFamilyStore, Integer> estimatedCompactions = new NonBlockingHashMap<ColumnFamilyStore,
Integer>();
+    private static final NamedThreadFactory gcThreadFactory = new NamedThreadFactory("GC-INVOKER");
 
     /**
      * Call this whenever a compaction might be needed on the given columnfamily.
@@ -445,7 +447,7 @@
      */
     static void gcAfterRpcTimeout()
     {
-        new Thread(new WrappedRunnable()
+        gcThreadFactory.newThread(new WrappedRunnable()
         {
             public void runMayThrow() throws InterruptedException
             {

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/HintedHandOffManager.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/HintedHandOffManager.java?rev=897238&r1=897237&r2=897238&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/HintedHandOffManager.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/HintedHandOffManager.java Fri
Jan  8 15:58:38 2010
@@ -122,7 +122,7 @@
                     deliverAllHints();
                 }
             }
-        }).start();
+        }, "Hint delivery").start();
     }
 
     private static boolean sendMessage(InetAddress endPoint, String tableName, String key)
throws IOException

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/BootStrapper.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/BootStrapper.java?rev=897238&r1=897237&r2=897238&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/BootStrapper.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/dht/BootStrapper.java Fri Jan
 8 15:58:38 2010
@@ -93,7 +93,7 @@
                     Streaming.requestRanges(source, entry.getValue());
                 }
             }
-        }).start();
+        }, "Boostrap requester").start();
     }
 
     /**

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/io/DeletionService.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/io/DeletionService.java?rev=897238&r1=897237&r2=897238&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/io/DeletionService.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/io/DeletionService.java Fri Jan
 8 15:58:38 2010
@@ -5,6 +5,7 @@
 import java.util.concurrent.ExecutorService;
 
 import org.apache.cassandra.concurrent.JMXEnabledThreadPoolExecutor;
+import org.apache.cassandra.concurrent.NamedThreadFactory;
 import org.apache.cassandra.io.util.FileUtils;
 import org.apache.cassandra.utils.WrappedRunnable;
 
@@ -57,7 +58,7 @@
                             }
                             submitDeleteWithRetry(file, retryCount + 1);
                         }
-                    }).start();
+                    }, "Delete submission: " + file).start();
                 }
             }
         };

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/io/SSTableReader.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/io/SSTableReader.java?rev=897238&r1=897237&r2=897238&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/io/SSTableReader.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/io/SSTableReader.java Fri Jan
 8 15:58:38 2010
@@ -669,7 +669,7 @@
                     DeletionService.submitDeleteWithRetry(SSTable.filterFilename(path));
                     DeletionService.submitDeleteWithRetry(SSTable.compactedFilename(path));
                 }
-            }).start();
+            }, "Cleanup " + path).start();
         }
     }
 }



Mime
View raw message