You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2009/09/08 20:59:17 UTC

svn commit: r812639 - /incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java

Author: jbellis
Date: Tue Sep  8 18:59:17 2009
New Revision: 812639

URL: http://svn.apache.org/viewvc?rev=812639&view=rev
Log:
r/m unused BUFSIZE
patch by jbellis; reviewed by Eric Evans for CASSANDRA-424

Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=812639&r1=812638&r2=812639&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java Tue Sep  8 18:59:17 2009
@@ -53,8 +53,6 @@
 {
     private static Logger logger_ = Logger.getLogger(ColumnFamilyStore.class);
 
-    private static final int BUFSIZE = 128 * 1024 * 1024;
-
     private static NonBlockingHashMap<String, Set<Memtable>> memtablesPendingFlush = new NonBlockingHashMap<String, Set<Memtable>>();
     private static ExecutorService flusher_ = new DebuggableThreadPoolExecutor(DatabaseDescriptor.getFlushMinThreads(), DatabaseDescriptor.getFlushMaxThreads(), Integer.MAX_VALUE, TimeUnit.SECONDS, new LinkedBlockingQueue<Runnable>(), new ThreadFactoryImpl("MEMTABLE-FLUSHER-POOL"));
     
@@ -686,7 +684,7 @@
                 continue;
             }
             Collections.sort(files, new FileNameComparator(FileNameComparator.Ascending));
-            filesCompacted += doFileCompaction(files.subList(0, Math.min(files.size(), maxThreshold)), BUFSIZE);
+            filesCompacted += doFileCompaction(files.subList(0, Math.min(files.size(), maxThreshold)));
         }
         return filesCompacted;
     }
@@ -722,7 +720,7 @@
         {
             files = filesInternal;
         }
-        doFileCompaction(files, BUFSIZE);
+        doFileCompaction(files);
     }
 
     /*
@@ -1009,7 +1007,7 @@
     * to get the latest data.
     *
     */
-    private int doFileCompaction(List<String> files, int minBufferSize) throws IOException
+    private int doFileCompaction(List<String> files) throws IOException
     {
         logger_.info("Compacting [" + StringUtils.join(files, ",") + "]");
         String compactionFileLocation = DatabaseDescriptor.getDataFileLocationForTable(table_, getExpectedCompactedFileSize(files));
@@ -1019,7 +1017,7 @@
         {
             String maxFile = getMaxSizeFile(files);
             files.remove(maxFile);
-            return doFileCompaction(files, minBufferSize);
+            return doFileCompaction(files);
         }
 
         String newfile = null;