Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix SequenceFile to know about new int in CF serialization. patch by …

…Jun Rao; reviewed by jbellis for #33
  • Loading branch information...
commit a8baa19ff160caed31fc9f0dcf3a6782962efe28 1 parent 179dfe5
Jonathan Ellis authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/org/apache/cassandra/io/SequenceFile.java
View
12 src/org/apache/cassandra/io/SequenceFile.java
@@ -875,6 +875,10 @@ private void readTimeRange(String key, DataOutputBuffer bufOut, String columnFam
/* read the column family name */
String cfName = file_.readUTF();
dataSize -= (utfPrefix_ + cfName.length());
+
+ /* read local deletion time */
+ int localDeletionTime = file_.readInt();
+ dataSize -=4;
/* read if this cf is marked for delete */
long markedForDeleteAt = file_.readLong();
@@ -902,6 +906,8 @@ private void readTimeRange(String key, DataOutputBuffer bufOut, String columnFam
bufOut.writeInt(dataSize + utfPrefix_ + cfName.length() + 4 + 1);
/* write the column family name */
bufOut.writeUTF(cfName);
+ /* write local deletion time */
+ bufOut.writeInt(localDeletionTime);
/* write if this cf is marked for delete */
bufOut.writeLong(markedForDeleteAt);
/* write number of columns */
@@ -949,6 +955,10 @@ private void readColumns(String key, DataOutputBuffer bufOut, String columnFamil
String cfName = file_.readUTF();
dataSize -= (utfPrefix_ + cfName.length());
+ /* read local deletion time */
+ int localDeletionTime = file_.readInt();
+ dataSize -=4;
+
/* read if this cf is marked for delete */
long markedForDeleteAt = file_.readLong();
dataSize -= 8;
@@ -984,6 +994,8 @@ private void readColumns(String key, DataOutputBuffer bufOut, String columnFamil
bufOut.writeInt(dataSizeReturned + utfPrefix_ + cfName.length() + 4 + 1);
/* write the column family name */
bufOut.writeUTF(cfName);
+ /* write local deletion time */
+ bufOut.writeInt(localDeletionTime);
/* write if this cf is marked for delete */
bufOut.writeLong(markedForDeleteAt);
/* write number of columns */
Please sign in to comment.
Something went wrong with that request. Please try again.