fix SequenceFile to know about new int in CF serialization. patch by Jun Rao; reviewed by jbellis for #33

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@766199 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Ellis 2009-04-18 01:33:24 +00:00
parent 0c0c6e5fda
commit 6be087a80a
1 changed files with 12 additions and 0 deletions

View File

@ -875,6 +875,10 @@ public class SequenceFile
/* 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 @@ public class SequenceFile
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 @@ public class SequenceFile
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 @@ public class SequenceFile
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 */