cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [4/18] git commit: merge from 1.0
Date Mon, 26 Mar 2012 15:57:38 GMT
merge from 1.0


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

Branch: refs/heads/cassandra-1.1
Commit: d3c5dbdd6be4edfbbaf6c0de8c71b920be44739d
Parents: f11e4f2 8b23dca
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Mon Mar 26 10:54:45 2012 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Mon Mar 26 10:54:45 2012 -0500

----------------------------------------------------------------------
 .../cassandra/config/DatabaseDescriptor.java       |    2 +-
 .../org/apache/cassandra/utils/MerkleTree.java     |    1 +
 .../serialization/1.0/db.RangeSliceCommand.bin     |  Bin 0 -> 777 bytes
 test/data/serialization/1.0/db.Row.bin             |  Bin 0 -> 495 bytes
 test/data/serialization/1.0/db.RowMutation.bin     |  Bin 0 -> 3266 bytes
 .../1.0/db.SliceByNamesReadCommand.bin             |  Bin 0 -> 367 bytes
 .../serialization/1.0/db.SliceFromReadCommand.bin  |  Bin 0 -> 361 bytes
 test/data/serialization/1.0/db.Truncation.bin      |  Bin 0 -> 257 bytes
 test/data/serialization/1.0/db.WriteResponse.bin   |  Bin 0 -> 38 bytes
 .../serialization/1.0/db.migration.Keyspace1.bin   |    1 +
 .../serialization/1.0/db.migration.Keyspace2.bin   |    1 +
 .../serialization/1.0/db.migration.Keyspace3.bin   |    1 +
 .../serialization/1.0/db.migration.Keyspace4.bin   |    1 +
 .../serialization/1.0/db.migration.Keyspace5.bin   |    1 +
 test/data/serialization/1.0/gms.EndpointState.bin  |  Bin 0 -> 73 bytes
 test/data/serialization/1.0/gms.Gossip.bin         |  Bin 0 -> 110 bytes
 .../data/serialization/1.0/service.TreeRequest.bin |  Bin 0 -> 121 bytes
 .../serialization/1.0/service.TreeResponse.bin     |  Bin 0 -> 930 bytes
 .../serialization/1.0/streaming.PendingFile.bin    |  Bin 0 -> 3436 bytes
 .../serialization/1.0/streaming.StreamHeader.bin   |  Bin 0 -> 174421 bytes
 .../serialization/1.0/streaming.StreamReply.bin    |  Bin 0 -> 73 bytes
 .../1.0/streaming.StreamRequestMessage.bin         |  Bin 0 -> 7087 bytes
 test/data/serialization/1.0/utils.BloomFilter.bin  |  Bin 0 -> 2500016 bytes
 .../serialization/1.0/utils.EstimatedHistogram.bin |  Bin 0 -> 97500 bytes
 .../serialization/1.0/utils.LegacyBloomFilter.bin  |  Bin 0 -> 5000170 bytes
 .../cassandra/AbstractSerializationsTester.java    |    6 +++-
 .../apache/cassandra/net/MessageSerializer.java    |    1 -
 .../cassandra/service/SerializationsTest.java      |   20 +++++++++------
 .../apache/cassandra/utils/SerializationsTest.java |    7 +++--
 29 files changed, 27 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d3c5dbdd/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d3c5dbdd/src/java/org/apache/cassandra/utils/MerkleTree.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/utils/MerkleTree.java
index fc73ef0,c220369..9c7bdc1
--- a/src/java/org/apache/cassandra/utils/MerkleTree.java
+++ b/src/java/org/apache/cassandra/utils/MerkleTree.java
@@@ -71,8 -71,9 +71,9 @@@ public class MerkleTree implements Seri
       * the request so we can add it back post-deserialization (as for the
       * partitioner).
       */
 -    public transient Range fullRange;
 +    public transient Range<Token> fullRange;
  
+     // TODO This is broken; Token serialization assumes system partitioner, so if this doesn't
match all hell breaks loose
      private transient IPartitioner partitioner;
  
      private long maxsize;

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d3c5dbdd/test/unit/org/apache/cassandra/AbstractSerializationsTester.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d3c5dbdd/test/unit/org/apache/cassandra/net/MessageSerializer.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d3c5dbdd/test/unit/org/apache/cassandra/service/SerializationsTest.java
----------------------------------------------------------------------
diff --cc test/unit/org/apache/cassandra/service/SerializationsTest.java
index 88de571,3792673..d736a95
--- a/test/unit/org/apache/cassandra/service/SerializationsTest.java
+++ b/test/unit/org/apache/cassandra/service/SerializationsTest.java
@@@ -40,9 -40,14 +40,14 @@@ import org.apache.cassandra.utils.Merkl
  
  public class SerializationsTest extends AbstractSerializationsTester
  {
+     static
+     {
+         System.setProperty("cassandra.partitioner", "RandomPartitioner");
+     }
+ 
      private static MessageSerializer messageSerializer = new MessageSerializer();
  
 -    public static Range FULL_RANGE = new Range(StorageService.getPartitioner().getMinimumToken(),
StorageService.getPartitioner().getMinimumToken());
 +    public static Range<Token> FULL_RANGE = new Range<Token>(StorageService.getPartitioner().getMinimumToken(),
StorageService.getPartitioner().getMinimumToken());
  
      private void testTreeRequestWrite() throws IOException
      {
@@@ -63,20 -68,18 +68,19 @@@
          assert messageSerializer.deserialize(in, getVersion()) != null;
          in.close();
      }
 +
      private void testTreeResponseWrite() throws IOException
      {
+         // empty validation
          AntiEntropyService.Validator v0 = new AntiEntropyService.Validator(Statics.req);
-         IPartitioner part = new RandomPartitioner();
-         MerkleTree mt = new MerkleTree(part, FULL_RANGE, MerkleTree.RECOMMENDED_DEPTH, Integer.MAX_VALUE);
-         List<Token> tokens = new ArrayList<Token>();
+ 
+         // validation with a tree
+         IPartitioner p = new RandomPartitioner();
+         MerkleTree mt = new MerkleTree(p, FULL_RANGE, MerkleTree.RECOMMENDED_DEPTH, Integer.MAX_VALUE);
          for (int i = 0; i < 10; i++)
-         {
-             Token t = part.getRandomToken();
-             tokens.add(t);
-             mt.split(t);
-         }
+             mt.split(p.getRandomToken());
          AntiEntropyService.Validator v1 = new AntiEntropyService.Validator(Statics.req,
mt);
+ 
          DataOutputStream out = getOutput("service.TreeResponse.bin");
          AntiEntropyService.TreeResponseVerbHandler.SERIALIZER.serialize(v0, out, getVersion());
          AntiEntropyService.TreeResponseVerbHandler.SERIALIZER.serialize(v1, out, getVersion());

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d3c5dbdd/test/unit/org/apache/cassandra/utils/SerializationsTest.java
----------------------------------------------------------------------


Mime
View raw message