cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdusba...@apache.org
Subject svn commit: r957294 - in /cassandra/trunk/src/java/org/apache/cassandra/io/sstable: SSTableReader.java SSTableWriter.java
Date Wed, 23 Jun 2010 18:31:23 GMT
Author: gdusbabek
Date: Wed Jun 23 18:31:23 2010
New Revision: 957294

URL: http://svn.apache.org/viewvc?rev=957294&view=rev
Log:
use raw key when recreating or writing bloom filter

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
    cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableReader.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableReader.java?rev=957294&r1=957293&r2=957294&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableReader.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableReader.java Wed Jun 23
18:31:23 2010
@@ -380,7 +380,7 @@ public class SSTableReader extends SSTab
     public long getPosition(DecoratedKey decoratedKey, Operator op)
     {
         // first, check bloom filter
-        if (op == Operator.EQ && !bf.isPresent(partitioner.convertToDiskFormat(decoratedKey)))
+        if (op == Operator.EQ && !bf.isPresent(decoratedKey.key))
             return -1;
 
         // next, the key cache

Modified: cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java?rev=957294&r1=957293&r2=957294&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/io/sstable/SSTableWriter.java Wed Jun 23
18:31:23 2010
@@ -294,10 +294,9 @@ public class SSTableWriter extends SSTab
 
         public void afterAppend(DecoratedKey key, long dataPosition) throws IOException
         {
-            byte[] diskKey = partitioner.convertToDiskFormat(key);
-            bf.add(diskKey);
+            bf.add(key.key);
             long indexPosition = indexFile.getFilePointer();
-            FBUtilities.writeShortByteArray(diskKey, indexFile);
+            FBUtilities.writeShortByteArray(key.key, indexFile);
             indexFile.writeLong(dataPosition);
             if (logger.isTraceEnabled())
                 logger.trace("wrote index of " + key + " at " + indexPosition);



Mime
View raw message