cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject git commit: Deserialize to arrays instead of trees patch by jbellis; reviewed by slebresne for CASSANDRA-5389
Date Wed, 27 Mar 2013 20:36:02 GMT
Updated Branches:
  refs/heads/trunk 4c348c422 -> d21556f4f


Deserialize to arrays instead of trees
patch by jbellis; reviewed by slebresne for CASSANDRA-5389


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

Branch: refs/heads/trunk
Commit: d21556f4f53d4b59c3e2ae1d3571fb1fba6bf5ed
Parents: 4c348c4
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Wed Mar 27 11:27:20 2013 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Wed Mar 27 11:27:34 2013 -0500

----------------------------------------------------------------------
 .../cassandra/db/ColumnFamilySerializer.java       |    6 +++---
 src/java/org/apache/cassandra/db/ReadResponse.java |    2 +-
 src/java/org/apache/cassandra/db/Row.java          |    6 +++---
 src/java/org/apache/cassandra/db/RowMutation.java  |    2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d21556f4/src/java/org/apache/cassandra/db/ColumnFamilySerializer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilySerializer.java b/src/java/org/apache/cassandra/db/ColumnFamilySerializer.java
index 3c88b54..0a1db4e 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilySerializer.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilySerializer.java
@@ -88,15 +88,15 @@ public class ColumnFamilySerializer implements IVersionedSerializer<ColumnFamily
 
     public ColumnFamily deserialize(DataInput in, int version) throws IOException
     {
-        return deserialize(in, ColumnSerializer.Flag.LOCAL, TreeMapBackedSortedColumns.factory(),
version);
+        return deserialize(in, ColumnSerializer.Flag.LOCAL, version);
     }
 
-    public ColumnFamily deserialize(DataInput in, ColumnSerializer.Flag flag, ISortedColumns.Factory
factory, int version) throws IOException
+    public ColumnFamily deserialize(DataInput in, ColumnSerializer.Flag flag, int version)
throws IOException
     {
         if (!in.readBoolean())
             return null;
 
-        ColumnFamily cf = ColumnFamily.create(deserializeCfId(in, version), factory);
+        ColumnFamily cf = ColumnFamily.create(deserializeCfId(in, version), ArrayBackedSortedColumns.factory());
         int expireBefore = (int) (System.currentTimeMillis() / 1000);
 
         if (cf.metadata().isSuper() && version < MessagingService.VERSION_20)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d21556f4/src/java/org/apache/cassandra/db/ReadResponse.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ReadResponse.java b/src/java/org/apache/cassandra/db/ReadResponse.java
index c4cb96b..0afb27b 100644
--- a/src/java/org/apache/cassandra/db/ReadResponse.java
+++ b/src/java/org/apache/cassandra/db/ReadResponse.java
@@ -93,7 +93,7 @@ class ReadResponseSerializer implements IVersionedSerializer<ReadResponse>
         if (!isDigest)
         {
             // This is coming from a remote host
-            row = Row.serializer.deserialize(in, version, ColumnSerializer.Flag.FROM_REMOTE,
ArrayBackedSortedColumns.factory());
+            row = Row.serializer.deserialize(in, version, ColumnSerializer.Flag.FROM_REMOTE);
         }
 
         return isDigest ? new ReadResponse(ByteBuffer.wrap(digest)) : new ReadResponse(row);

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d21556f4/src/java/org/apache/cassandra/db/Row.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/Row.java b/src/java/org/apache/cassandra/db/Row.java
index d6435ba..785b058 100644
--- a/src/java/org/apache/cassandra/db/Row.java
+++ b/src/java/org/apache/cassandra/db/Row.java
@@ -61,15 +61,15 @@ public class Row
             ColumnFamily.serializer.serialize(row.cf, out, version);
         }
 
-        public Row deserialize(DataInput in, int version, ColumnSerializer.Flag flag, ISortedColumns.Factory
factory) throws IOException
+        public Row deserialize(DataInput in, int version, ColumnSerializer.Flag flag) throws
IOException
         {
             return new Row(StorageService.getPartitioner().decorateKey(ByteBufferUtil.readWithShortLength(in)),
-                           ColumnFamily.serializer.deserialize(in, flag, factory, version));
+                           ColumnFamily.serializer.deserialize(in, flag, version));
         }
 
         public Row deserialize(DataInput in, int version) throws IOException
         {
-            return deserialize(in, version, ColumnSerializer.Flag.LOCAL, TreeMapBackedSortedColumns.factory());
+            return deserialize(in, version, ColumnSerializer.Flag.LOCAL);
         }
 
         public long serializedSize(Row row, int version)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d21556f4/src/java/org/apache/cassandra/db/RowMutation.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/RowMutation.java b/src/java/org/apache/cassandra/db/RowMutation.java
index 4495dae..9f3efa0 100644
--- a/src/java/org/apache/cassandra/db/RowMutation.java
+++ b/src/java/org/apache/cassandra/db/RowMutation.java
@@ -280,7 +280,7 @@ public class RowMutation implements IMutation
             // We used to uselessly write the cf id here
             if (version < MessagingService.VERSION_12)
                 ColumnFamily.serializer.deserializeCfId(in, version);
-            ColumnFamily cf = ColumnFamily.serializer.deserialize(in, flag, TreeMapBackedSortedColumns.factory(),
version);
+            ColumnFamily cf = ColumnFamily.serializer.deserialize(in, flag, version);
             // We don't allow RowMutation with null column family, so we should never get
null back.
             assert cf != null;
             return cf;


Mime
View raw message