cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r1091447 - in /cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db: ColumnFamilyStore.java RowIteratorFactory.java columniterator/IColumnIterator.java columniterator/SSTableSliceIterator.java columniterator/SimpleSliceReader.java
Date Tue, 12 Apr 2011 15:12:01 GMT
Author: jbellis
Date: Tue Apr 12 15:12:00 2011
New Revision: 1091447

URL: http://svn.apache.org/viewvc?rev=1091447&view=rev
Log:
r/m unnecessary declaration of IOException from IColumnIterator.getColumnFamily
patch by Stu Hood; reviewed by jbellis for CASSANDRA-2446

Modified:
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/RowIteratorFactory.java
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/columniterator/IColumnIterator.java
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/columniterator/SSTableSliceIterator.java
    cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/columniterator/SimpleSliceReader.java

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/ColumnFamilyStore.java?rev=1091447&r1=1091446&r2=1091447&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
Tue Apr 12 15:12:00 2011
@@ -1232,15 +1232,7 @@ public class ColumnFamilyStore implement
         }
 
         IColumnIterator ci = filter.getMemtableColumnIterator(cached, null, getComparator());
-        ColumnFamily cf = null;
-        try
-        {
-            cf = ci.getColumnFamily().cloneMeShallow();
-        }
-        catch (IOException e)
-        {
-            throw new IOError(e);
-        }
+        ColumnFamily cf = ci.getColumnFamily().cloneMeShallow();
         filter.collectCollatedColumns(cf, ci, gcBefore);
         // TODO this is necessary because when we collate supercolumns together, we don't
check
         // their subcolumns for relevance, so we need to do a second prune post facto here.
@@ -1302,10 +1294,6 @@ public class ColumnFamilyStore implement
             // and "there used to be data, but it's gone now" (we should cache the empty
CF so we don't need to rebuild that slower)
             return returnCF;
         }
-        catch (IOException e)
-        {
-            throw new IOError(e);
-        }
         finally
         {
             /* close all cursors */

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/RowIteratorFactory.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/RowIteratorFactory.java?rev=1091447&r1=1091446&r2=1091447&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/RowIteratorFactory.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/RowIteratorFactory.java
Tue Apr 12 15:12:00 2011
@@ -118,14 +118,7 @@ public class RowIteratorFactory
             {
                 this.colIters.add(current);
                 this.key = current.getKey();
-                try
-                {
-                    this.returnCF.delete(current.getColumnFamily());
-                }
-                catch (IOException e)
-                {
-                    throw new IOError(e);
-                }
+                this.returnCF.delete(current.getColumnFamily());
             }
 
             @Override

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/columniterator/IColumnIterator.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/columniterator/IColumnIterator.java?rev=1091447&r1=1091446&r2=1091447&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/columniterator/IColumnIterator.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/columniterator/IColumnIterator.java
Tue Apr 12 15:12:00 2011
@@ -31,14 +31,9 @@ import org.apache.cassandra.db.IColumn;
 public interface IColumnIterator extends Iterator<IColumn>
 {
     /**
-     * returns the CF of the column being iterated.
-     * Do not modify the returned CF; clone first.
-     * This is guaranteed to be non-null and that the returned CF have the correct metadata
-     * (markedForDeleteAt and localDeletionTime). The full CF is however only guaranteed
to 
-     * be available after a call to next() or hasNext().
-     * @throws IOException 
+     * @return An empty CF holding metadata for the row being iterated.
      */
-    public abstract ColumnFamily getColumnFamily() throws IOException;
+    public abstract ColumnFamily getColumnFamily();
 
     /**
      * @return the current row key

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/columniterator/SSTableSliceIterator.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/columniterator/SSTableSliceIterator.java?rev=1091447&r1=1091446&r2=1091447&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/columniterator/SSTableSliceIterator.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/columniterator/SSTableSliceIterator.java
Tue Apr 12 15:12:00 2011
@@ -98,7 +98,7 @@ public class SSTableSliceIterator implem
         return key;
     }
 
-    public ColumnFamily getColumnFamily() throws IOException
+    public ColumnFamily getColumnFamily()
     {
         return reader == null ? null : reader.getColumnFamily();
     }

Modified: cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/columniterator/SimpleSliceReader.java
URL: http://svn.apache.org/viewvc/cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/columniterator/SimpleSliceReader.java?rev=1091447&r1=1091446&r2=1091447&view=diff
==============================================================================
--- cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/columniterator/SimpleSliceReader.java
(original)
+++ cassandra/branches/cassandra-0.8/src/java/org/apache/cassandra/db/columniterator/SimpleSliceReader.java
Tue Apr 12 15:12:00 2011
@@ -89,7 +89,7 @@ class SimpleSliceReader extends Abstract
         return column;
     }
 
-    public ColumnFamily getColumnFamily() throws IOException
+    public ColumnFamily getColumnFamily()
     {
         return emptyColumnFamily;
     }



Mime
View raw message