cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject svn commit: r759218 - /incubator/cassandra/trunk/src/org/apache/cassandra/db/CountFilter.java
Date Fri, 27 Mar 2009 16:38:10 GMT
Author: jbellis
Date: Fri Mar 27 16:38:09 2009
New Revision: 759218

URL: http://svn.apache.org/viewvc?rev=759218&view=rev
Log:
use isSuper

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

Modified: incubator/cassandra/trunk/src/org/apache/cassandra/db/CountFilter.java
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/src/org/apache/cassandra/db/CountFilter.java?rev=759218&r1=759217&r2=759218&view=diff
==============================================================================
--- incubator/cassandra/trunk/src/org/apache/cassandra/db/CountFilter.java (original)
+++ incubator/cassandra/trunk/src/org/apache/cassandra/db/CountFilter.java Fri Mar 27 16:38:09
2009
@@ -21,7 +21,6 @@
 import java.io.IOException;
 import java.util.Collection;
 
-import org.apache.cassandra.config.DatabaseDescriptor;
 import org.apache.cassandra.io.DataInputBuffer;
 import org.apache.cassandra.io.SSTable;
 
@@ -37,19 +36,19 @@
 {
 	private long countLimit_;
 	private boolean isDone_;
-	
+
 	CountFilter(int countLimit)
 	{
-		countLimit_ = countLimit;		
+		countLimit_ = countLimit;
 		isDone_ = false;
 	}
-	
+
 	public ColumnFamily filter(String cfNameParam, ColumnFamily columnFamily)
 	{
     	String[] values = RowMutation.getColumnAndColumnFamily(cfNameParam);
         if ( columnFamily == null )
             return columnFamily;
-        
+
 		String cfName = columnFamily.name();
 		ColumnFamily filteredCf = new ColumnFamily(cfName);
 		if( countLimit_ <= 0 )
@@ -71,7 +70,7 @@
     			}
     		}
 		}
-		else if(values.length == 2 && DatabaseDescriptor.getColumnType(cfName).equals("Super"))
+		else if(values.length == 2 && columnFamily.isSuper())
 		{
     		Collection<IColumn> columns = columnFamily.getAllColumns();
     		for(IColumn column : columns)
@@ -91,14 +90,14 @@
 	    			}
         		}
     		}
-		}    	
-    	else 
+		}
+    	else
     	{
     		throw new UnsupportedOperationException();
     	}
 		return filteredCf;
 	}
-    
+
     public IColumn filter(IColumn column, DataInputStream dis) throws IOException
     {
 		countLimit_--;
@@ -108,7 +107,7 @@
 		}
 		return column;
     }
-	
+
 	public boolean isDone()
 	{
 		return isDone_;



Mime
View raw message