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 2010/02/09 18:52:46 UTC

svn commit: r908131 - in /incubator/cassandra/trunk: src/java/org/apache/cassandra/config/ src/java/org/apache/cassandra/db/ src/java/org/apache/cassandra/db/commitlog/ test/unit/org/apache/cassandra/db/

Author: jbellis
Date: Tue Feb  9 17:52:44 2010
New Revision: 908131

URL: http://svn.apache.org/viewvc?rev=908131&view=rev
Log:
mv commitlog classes into db.commitlog package.  patch by jbellis

Added:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLog.java   (contents, props changed)
      - copied, changed from r907797, incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLog.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogExecutorService.java   (contents, props changed)
      - copied, changed from r907797, incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogExecutorService.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogExecutorServiceMBean.java   (contents, props changed)
      - copied, changed from r907797, incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogExecutorServiceMBean.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogHeader.java   (contents, props changed)
      - copied, changed from r907797, incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogHeader.java
Removed:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLog.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogExecutorService.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogExecutorServiceMBean.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogHeader.java
Modified:
    incubator/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RecoveryManager.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RowMutation.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Table.java
    incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/CommitLogTest.java

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java?rev=908131&r1=908130&r2=908131&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java Tue Feb  9 17:52:44 2010
@@ -21,6 +21,7 @@
 import org.apache.cassandra.auth.AllowAllAuthenticator;
 import org.apache.cassandra.auth.IAuthenticator;
 import org.apache.cassandra.db.*;
+import org.apache.cassandra.db.commitlog.CommitLog;
 import org.apache.cassandra.db.marshal.AbstractType;
 import org.apache.cassandra.db.marshal.BytesType;
 import org.apache.cassandra.db.marshal.UTF8Type;

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=908131&r1=908130&r2=908131&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 Feb  9 17:52:44 2010
@@ -39,6 +39,7 @@
 import org.apache.log4j.Logger;
 
 import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.db.commitlog.CommitLog;
 import org.apache.cassandra.dht.AbstractBounds;
 import org.apache.cassandra.dht.Bounds;
 import org.apache.cassandra.dht.Range;

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RecoveryManager.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RecoveryManager.java?rev=908131&r1=908130&r2=908131&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RecoveryManager.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RecoveryManager.java Tue Feb  9 17:52:44 2010
@@ -22,6 +22,7 @@
 import java.io.*;
 
 import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.db.commitlog.CommitLog;
 import org.apache.cassandra.io.util.FileUtils;
 import org.apache.log4j.Logger;
 import org.apache.commons.lang.StringUtils;

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RowMutation.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RowMutation.java?rev=908131&r1=908130&r2=908131&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RowMutation.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/RowMutation.java Tue Feb  9 17:52:44 2010
@@ -55,7 +55,7 @@
         serializer_ = new RowMutationSerializer();
     }   
 
-    static ICompactSerializer<RowMutation> serializer()
+    public static ICompactSerializer<RowMutation> serializer()
     {
         return serializer_;
     }

Modified: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Table.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Table.java?rev=908131&r1=908130&r2=908131&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Table.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/Table.java Tue Feb  9 17:52:44 2010
@@ -25,9 +25,9 @@
 import java.util.concurrent.Future;
 
 import com.google.common.base.Function;
-import com.google.common.collect.AbstractIterator;
 import com.google.common.collect.Iterables;
 import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.db.commitlog.CommitLog;
 import org.apache.cassandra.dht.Range;
 import org.apache.cassandra.io.SSTableDeletingReference;
 import org.apache.cassandra.io.SSTableReader;
@@ -358,7 +358,7 @@
         }, checkMs, checkMs);
     }
 
-    int getColumnFamilyId(String columnFamily)
+    public int getColumnFamilyId(String columnFamily)
     {
         return tableMetadata.getColumnFamilyId(columnFamily);
     }
@@ -386,7 +386,7 @@
      * Once this happens the data associated with the individual column families
      * is also written to the column family store's memtable.
     */
-    void apply(RowMutation mutation, Object serializedMutation, boolean writeCommitLog) throws IOException
+    public void apply(RowMutation mutation, Object serializedMutation, boolean writeCommitLog) throws IOException
     {
         HashMap<ColumnFamilyStore,Memtable> memtablesToFlush = new HashMap<ColumnFamilyStore, Memtable>(2);
 

Copied: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLog.java (from r907797, incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLog.java)
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLog.java?p2=incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLog.java&p1=incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLog.java&r1=907797&r2=908131&rev=908131&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLog.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLog.java Tue Feb  9 17:52:44 2010
@@ -16,9 +16,12 @@
  * limitations under the License.
  */
 
-package org.apache.cassandra.db;
+package org.apache.cassandra.db.commitlog;
 
 import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.db.ColumnFamily;
+import org.apache.cassandra.db.RowMutation;
+import org.apache.cassandra.db.Table;
 import org.apache.cassandra.io.util.BufferedRandomAccessFile;
 import org.apache.cassandra.io.util.DataOutputBuffer;
 import org.apache.cassandra.io.DeletionService;
@@ -92,7 +95,7 @@
             this.position = position;
         }
 
-        boolean isValidContext()
+        public boolean isValidContext()
         {
             return (position != -1L);
         }
@@ -120,7 +123,7 @@
         SEGMENT_SIZE = size;
     }
 
-    static int getSegmentCount()
+    public static int getSegmentCount()
     {
         return clHeaders_.size();
     }
@@ -136,7 +139,7 @@
         return new BufferedRandomAccessFile(file, "rw");
     }
 
-    static CommitLog open() throws IOException
+    public static CommitLog open() throws IOException
     {
         if ( instance_ == null )
         {
@@ -277,7 +280,7 @@
         logWriter.sync();
     }
 
-    void recover(File[] clogs) throws IOException
+    public void recover(File[] clogs) throws IOException
     {
         Set<Table> tablesRecovered = new HashSet<Table>();
         assert StageManager.getStage(StageManager.MUTATION_STAGE).getCompletedTaskCount() == 0;
@@ -413,7 +416,7 @@
         }
     }
     
-    CommitLogContext getContext() throws IOException
+    public CommitLogContext getContext() throws IOException
     {
         Callable<CommitLogContext> task = new Callable<CommitLogContext>()
         {
@@ -442,7 +445,7 @@
      * of any problems. This way we can assume that the subsequent commit log
      * entry will override the garbage left over by the previous write.
     */
-    Future<CommitLogContext> add(RowMutation rowMutation, Object serializedRow) throws IOException
+    public Future<CommitLogContext> add(RowMutation rowMutation, Object serializedRow) throws IOException
     {
         Callable<CommitLogContext> task = new LogRecordAdder(rowMutation, serializedRow);
         return executor.submit(task);
@@ -454,7 +457,7 @@
      * The bit flag associated with this column family is set in the
      * header and this is used to decide if the log file can be deleted.
     */
-    void onMemtableFlush(final String tableName, final String cf, final CommitLog.CommitLogContext cLogCtx) throws IOException
+    public void onMemtableFlush(final String tableName, final String cf, final CommitLog.CommitLogContext cLogCtx) throws IOException
     {
         Callable task = new Callable()
         {

Propchange: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLog.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogExecutorService.java (from r907797, incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogExecutorService.java)
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogExecutorService.java?p2=incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogExecutorService.java&p1=incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogExecutorService.java&r1=907797&r2=908131&rev=908131&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogExecutorService.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogExecutorService.java Tue Feb  9 17:52:44 2010
@@ -1,236 +1,213 @@
-package org.apache.cassandra.db;
-/*
- * 
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- * 
- */
-
-
-import java.io.IOException;
-import java.lang.management.ManagementFactory;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.*;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.atomic.AtomicBoolean;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import org.apache.cassandra.config.DatabaseDescriptor;
-import org.apache.cassandra.utils.WrappedRunnable;
-
-public class CommitLogExecutorService extends AbstractExecutorService implements CommitLogExecutorServiceMBean
-{
-    BlockingQueue<CheaterFutureTask> queue;
-
-    private volatile long completedTaskCount = 0;
-
-    public CommitLogExecutorService()
-    {
-        this(DatabaseDescriptor.getCommitLogSync() == DatabaseDescriptor.CommitLogSync.batch
-             ? DatabaseDescriptor.getConcurrentWriters()
-             : 1024 * Runtime.getRuntime().availableProcessors());
-    }
-
-    public CommitLogExecutorService(int queueSize)
-    {
-        queue = new LinkedBlockingQueue<CheaterFutureTask>(queueSize);
-        Runnable runnable = new WrappedRunnable()
-        {
-            public void runMayThrow() throws Exception
-            {
-                if (DatabaseDescriptor.getCommitLogSync() == DatabaseDescriptor.CommitLogSync.batch)
-                {
-                    while (true)
-                    {
-                        processWithSyncBatch();
-                        completedTaskCount++;
-                    }
-                }
-                else
-                {
-                    while (true)
-                    {
-                        process();
-                        completedTaskCount++;
-                    }
-                }
-            }
-        };
-        new Thread(runnable, "COMMIT-LOG-WRITER").start();
-
-        MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
-        try
-        {
-            mbs.registerMBean(this, new ObjectName("org.apache.cassandra.db:type=Commitlog"));
-        }
-        catch (Exception e)
-        {
-            throw new RuntimeException(e);
-        }
-    }
-
-
-    /**
-     * Get the current number of running tasks
-     */
-    public int getActiveCount()
-    {
-        return 1;
-    }
-
-    /**
-     * Get the number of completed tasks
-     */
-    public long getCompletedTasks()
-    {   
-        return completedTaskCount;
-    }
-
-    /**
-     * Get the number of tasks waiting to be executed
-     */
-    public long getPendingTasks()
-    {
-        return queue.size();
-    }
-
-    private void process() throws InterruptedException
-    {
-        queue.take().run();
-    }
-
-    private ArrayList<CheaterFutureTask> incompleteTasks = new ArrayList<CheaterFutureTask>();
-    private ArrayList taskValues = new ArrayList(); // TODO not sure how to generify this
-    private void processWithSyncBatch() throws Exception
-    {
-        CheaterFutureTask firstTask = queue.take();
-        if (!(firstTask.getRawCallable() instanceof CommitLog.LogRecordAdder))
-        {
-            firstTask.run();
-            return;
-        }
-
-        // attempt to do a bunch of LogRecordAdder ops before syncing
-        // (this is a little clunky since there is no blocking peek method,
-        //  so we have to break it into firstTask / extra tasks)
-        incompleteTasks.clear();
-        taskValues.clear();
-        long end = System.nanoTime() + (long)(1000000 * DatabaseDescriptor.getCommitLogSyncBatchWindow());
-
-        // it doesn't seem worth bothering future-izing the exception
-        // since if a commitlog op throws, we're probably screwed anyway
-        incompleteTasks.add(firstTask);
-        taskValues.add(firstTask.getRawCallable().call());
-        while (!queue.isEmpty()
-               && queue.peek().getRawCallable() instanceof CommitLog.LogRecordAdder
-               && System.nanoTime() < end)
-        {
-            CheaterFutureTask task = queue.remove();
-            incompleteTasks.add(task);
-            taskValues.add(task.getRawCallable().call());
-        }
-
-        // now sync and set the tasks' values (which allows thread calling get() to proceed)
-        try
-        {
-            CommitLog.open().sync();
-        }
-        catch (IOException e)
-        {
-            throw new RuntimeException(e);
-        }
-        for (int i = 0; i < incompleteTasks.size(); i++)
-        {
-            incompleteTasks.get(i).set(taskValues.get(i));
-        }
-    }
-
-
-    @Override
-    protected <T> RunnableFuture<T> newTaskFor(Runnable runnable, T value)
-    {
-        return newTaskFor(Executors.callable(runnable, value));
-    }
-
-    @Override
-    protected <T> RunnableFuture<T> newTaskFor(Callable<T> callable)
-    {
-        return new CheaterFutureTask(callable);
-    }
-
-    public void execute(Runnable command)
-    {
-        try
-        {
-            queue.put((CheaterFutureTask)command);
-        }
-        catch (InterruptedException e)
-        {
-            throw new RuntimeException(e);
-        }
-    }
-
-    public boolean isShutdown()
-    {
-        return false;
-    }
-
-    public boolean isTerminated()
-    {
-        return false;
-    }
-
-    // cassandra is crash-only so there's no need to implement the shutdown methods
-    public void shutdown()
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public List<Runnable> shutdownNow()
-    {
-        throw new UnsupportedOperationException();
-    }
-
-    public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
-    {
-        throw new UnsupportedOperationException();
-    }
-}
-
-class CheaterFutureTask<V> extends FutureTask<V>
-{
-    private Callable rawCallable;
-
-    public CheaterFutureTask(Callable<V> callable)
-    {
-        super(callable);
-        rawCallable = callable;
-    }
-
-    public Callable getRawCallable()
-    {
-        return rawCallable;
-    }
-
-    @Override
-    public void set(V v)
-    {
-        super.set(v);
-    }
-}
+package org.apache.cassandra.db.commitlog;
+
+import java.io.IOException;
+import java.lang.management.ManagementFactory;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.*;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.apache.cassandra.config.DatabaseDescriptor;
+import org.apache.cassandra.utils.WrappedRunnable;
+
+public class CommitLogExecutorService extends AbstractExecutorService implements CommitLogExecutorServiceMBean
+{
+    BlockingQueue<CheaterFutureTask> queue;
+
+    private volatile long completedTaskCount = 0;
+
+    public CommitLogExecutorService()
+    {
+        this(DatabaseDescriptor.getCommitLogSync() == DatabaseDescriptor.CommitLogSync.batch
+             ? DatabaseDescriptor.getConcurrentWriters()
+             : 1024 * Runtime.getRuntime().availableProcessors());
+    }
+
+    public CommitLogExecutorService(int queueSize)
+    {
+        queue = new LinkedBlockingQueue<CheaterFutureTask>(queueSize);
+        Runnable runnable = new WrappedRunnable()
+        {
+            public void runMayThrow() throws Exception
+            {
+                if (DatabaseDescriptor.getCommitLogSync() == DatabaseDescriptor.CommitLogSync.batch)
+                {
+                    while (true)
+                    {
+                        processWithSyncBatch();
+                        completedTaskCount++;
+                    }
+                }
+                else
+                {
+                    while (true)
+                    {
+                        process();
+                        completedTaskCount++;
+                    }
+                }
+            }
+        };
+        new Thread(runnable, "COMMIT-LOG-WRITER").start();
+
+        MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
+        try
+        {
+            mbs.registerMBean(this, new ObjectName("org.apache.cassandra.db:type=Commitlog"));
+        }
+        catch (Exception e)
+        {
+            throw new RuntimeException(e);
+        }
+    }
+
+
+    /**
+     * Get the current number of running tasks
+     */
+    public int getActiveCount()
+    {
+        return 1;
+    }
+
+    /**
+     * Get the number of completed tasks
+     */
+    public long getCompletedTasks()
+    {
+        return completedTaskCount;
+    }
+
+    /**
+     * Get the number of tasks waiting to be executed
+     */
+    public long getPendingTasks()
+    {
+        return queue.size();
+    }
+
+    private void process() throws InterruptedException
+    {
+        queue.take().run();
+    }
+
+    private ArrayList<CheaterFutureTask> incompleteTasks = new ArrayList<CheaterFutureTask>();
+    private ArrayList taskValues = new ArrayList(); // TODO not sure how to generify this
+    private void processWithSyncBatch() throws Exception
+    {
+        CheaterFutureTask firstTask = queue.take();
+        if (!(firstTask.getRawCallable() instanceof CommitLog.LogRecordAdder))
+        {
+            firstTask.run();
+            return;
+        }
+
+        // attempt to do a bunch of LogRecordAdder ops before syncing
+        // (this is a little clunky since there is no blocking peek method,
+        //  so we have to break it into firstTask / extra tasks)
+        incompleteTasks.clear();
+        taskValues.clear();
+        long end = System.nanoTime() + (long)(1000000 * DatabaseDescriptor.getCommitLogSyncBatchWindow());
+
+        // it doesn't seem worth bothering future-izing the exception
+        // since if a commitlog op throws, we're probably screwed anyway
+        incompleteTasks.add(firstTask);
+        taskValues.add(firstTask.getRawCallable().call());
+        while (!queue.isEmpty()
+               && queue.peek().getRawCallable() instanceof CommitLog.LogRecordAdder
+               && System.nanoTime() < end)
+        {
+            CheaterFutureTask task = queue.remove();
+            incompleteTasks.add(task);
+            taskValues.add(task.getRawCallable().call());
+        }
+
+        // now sync and set the tasks' values (which allows thread calling get() to proceed)
+        try
+        {
+            CommitLog.open().sync();
+        }
+        catch (IOException e)
+        {
+            throw new RuntimeException(e);
+        }
+        for (int i = 0; i < incompleteTasks.size(); i++)
+        {
+            incompleteTasks.get(i).set(taskValues.get(i));
+        }
+    }
+
+
+    @Override
+    protected <T> RunnableFuture<T> newTaskFor(Runnable runnable, T value)
+    {
+        return newTaskFor(Executors.callable(runnable, value));
+    }
+
+    @Override
+    protected <T> RunnableFuture<T> newTaskFor(Callable<T> callable)
+    {
+        return new CheaterFutureTask(callable);
+    }
+
+    public void execute(Runnable command)
+    {
+        try
+        {
+            queue.put((CheaterFutureTask)command);
+        }
+        catch (InterruptedException e)
+        {
+            throw new RuntimeException(e);
+        }
+    }
+
+    public boolean isShutdown()
+    {
+        return false;
+    }
+
+    public boolean isTerminated()
+    {
+        return false;
+    }
+
+    // cassandra is crash-only so there's no need to implement the shutdown methods
+    public void shutdown()
+    {
+        throw new UnsupportedOperationException();
+    }
+
+    public List<Runnable> shutdownNow()
+    {
+        throw new UnsupportedOperationException();
+    }
+
+    public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
+    {
+        throw new UnsupportedOperationException();
+    }
+}
+
+class CheaterFutureTask<V> extends FutureTask<V>
+{
+    private Callable rawCallable;
+
+    public CheaterFutureTask(Callable<V> callable)
+    {
+        super(callable);
+        rawCallable = callable;
+    }
+
+    public Callable getRawCallable()
+    {
+        return rawCallable;
+    }
+
+    @Override
+    public void set(V v)
+    {
+        super.set(v);
+    }
+}
\ No newline at end of file

Propchange: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogExecutorService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogExecutorServiceMBean.java (from r907797, incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogExecutorServiceMBean.java)
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogExecutorServiceMBean.java?p2=incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogExecutorServiceMBean.java&p1=incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogExecutorServiceMBean.java&r1=907797&r2=908131&rev=908131&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogExecutorServiceMBean.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogExecutorServiceMBean.java Tue Feb  9 17:52:44 2010
@@ -16,7 +16,7 @@
 * specific language governing permissions and limitations
 * under the License.
 */
-package org.apache.cassandra.db;
+package org.apache.cassandra.db.commitlog;
 
 import org.apache.cassandra.concurrent.IExecutorMBean;
 

Propchange: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogExecutorServiceMBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogHeader.java (from r907797, incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogHeader.java)
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogHeader.java?p2=incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogHeader.java&p1=incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogHeader.java&r1=907797&r2=908131&rev=908131&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/java/org/apache/cassandra/db/CommitLogHeader.java (original)
+++ incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogHeader.java Tue Feb  9 17:52:44 2010
@@ -16,12 +16,13 @@
  * limitations under the License.
  */
 
-package org.apache.cassandra.db;
+package org.apache.cassandra.db.commitlog;
 
 import java.io.*;
 import java.util.BitSet;
 import java.util.Arrays;
 
+import org.apache.cassandra.db.Table;
 import org.apache.cassandra.io.ICompactSerializer;
 import org.apache.cassandra.utils.BitSetSerializer;
 

Propchange: incubator/cassandra/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogHeader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/CommitLogTest.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/CommitLogTest.java?rev=908131&r1=908130&r2=908131&view=diff
==============================================================================
--- incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/CommitLogTest.java (original)
+++ incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/CommitLogTest.java Tue Feb  9 17:52:44 2010
@@ -24,6 +24,7 @@
 import org.junit.Test;
 
 import org.apache.cassandra.CleanupHelper;
+import org.apache.cassandra.db.commitlog.CommitLog;
 import org.apache.cassandra.db.filter.QueryPath;
 
 public class CommitLogTest extends CleanupHelper