cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [04/15] git commit: fix RIE.serializedSize
Date Wed, 24 Apr 2013 01:15:16 GMT
fix RIE.serializedSize


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e30c7303
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e30c7303
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e30c7303

Branch: refs/heads/trunk
Commit: e30c730355363dd72cb5dec12b19cf22cda705e6
Parents: 98b5195
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Mon Apr 22 08:41:06 2013 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Tue Apr 23 10:21:41 2013 -0500

----------------------------------------------------------------------
 .../org/apache/cassandra/db/RowIndexEntry.java     |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/e30c7303/src/java/org/apache/cassandra/db/RowIndexEntry.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/RowIndexEntry.java b/src/java/org/apache/cassandra/db/RowIndexEntry.java
index 2eda558..2444bcb 100644
--- a/src/java/org/apache/cassandra/db/RowIndexEntry.java
+++ b/src/java/org/apache/cassandra/db/RowIndexEntry.java
@@ -45,7 +45,12 @@ public class RowIndexEntry implements IMeasurableMemory
 
     public int serializedSize()
     {
-        return TypeSizes.NATIVE.sizeof(position);
+        return TypeSizes.NATIVE.sizeof(position) + promotedSize();
+    }
+
+    protected int promotedSize()
+    {
+        return 0;
     }
 
     public static RowIndexEntry create(long position, DeletionInfo deletionInfo, ColumnIndex
index)
@@ -99,7 +104,7 @@ public class RowIndexEntry implements IMeasurableMemory
             dos.writeLong(rie.position);
             if (rie.isIndexed())
             {
-                dos.writeInt(rie.serializedSize());
+                dos.writeInt(rie.promotedSize());
                 DeletionInfo.serializer().serializeForSSTable(rie.deletionInfo(), dos);
                 dos.writeInt(rie.columnsIndex().size());
                 for (IndexHelper.IndexInfo info : rie.columnsIndex())
@@ -194,7 +199,7 @@ public class RowIndexEntry implements IMeasurableMemory
         }
 
         @Override
-        public int serializedSize()
+        public int promotedSize()
         {
             TypeSizes typeSizes = TypeSizes.NATIVE;
             long size = DeletionTime.serializer.serializedSize(deletionInfo.getTopLevelDeletion(),
typeSizes);


Mime
View raw message