cassandra-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=957304&view=rev
Log:
back out of last commit

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=957304&r1=957303&r2=957304&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
19:00:09 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(decoratedKey.key))
+        if (op == Operator.EQ && !bf.isPresent(partitioner.convertToDiskFormat(decoratedKey)))
             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=957304&r1=957303&r2=957304&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
19:00:09 2010
@@ -294,9 +294,10 @@ public class SSTableWriter extends SSTab
 
         public void afterAppend(DecoratedKey key, long dataPosition) throws IOException
         {
-            bf.add(key.key);
+            byte[] diskKey = partitioner.convertToDiskFormat(key);
+            bf.add(diskKey);
             long indexPosition = indexFile.getFilePointer();
-            FBUtilities.writeShortByteArray(key.key, indexFile);
+            FBUtilities.writeShortByteArray(diskKey, indexFile);
             indexFile.writeLong(dataPosition);
             if (logger.isTraceEnabled())
                 logger.trace("wrote index of " + key + " at " + indexPosition);



Mime
View raw message