You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by be...@apache.org on 2015/09/15 19:24:18 UTC

[1/3] cassandra git commit: fix bad rebase

Repository: cassandra
Updated Branches:
  refs/heads/cassandra-3.0 b263af93a -> 06336377f
  refs/heads/trunk ac3b1cc2c -> 7a0698ee1


fix bad rebase


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

Branch: refs/heads/cassandra-3.0
Commit: 06336377f7f0dc064a9882424c82a9f47586a3da
Parents: b263af9
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Tue Sep 15 18:05:29 2015 +0100
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Tue Sep 15 18:05:29 2015 +0100

----------------------------------------------------------------------
 .../apache/cassandra/db/rows/RowBuilder.java    |  5 ++---
 .../org/apache/cassandra/db/rows/RowsTest.java  | 22 ++++++++++----------
 2 files changed, 13 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/06336377/test/unit/org/apache/cassandra/db/rows/RowBuilder.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/rows/RowBuilder.java b/test/unit/org/apache/cassandra/db/rows/RowBuilder.java
index caa5c40..b1223f1 100644
--- a/test/unit/org/apache/cassandra/db/rows/RowBuilder.java
+++ b/test/unit/org/apache/cassandra/db/rows/RowBuilder.java
@@ -36,7 +36,7 @@ public class RowBuilder implements Row.Builder
     public List<Cell> cells = new LinkedList<>();
     public Clustering clustering = null;
     public LivenessInfo livenessInfo = null;
-    public DeletionTime deletionTime = null;
+    public Row.Deletion deletionTime = null;
     public List<Pair<ColumnDefinition, DeletionTime>> complexDeletions = new LinkedList<>();
 
     public void addCell(Cell cell)
@@ -66,13 +66,12 @@ public class RowBuilder implements Row.Builder
         livenessInfo = info;
     }
 
-    public void addRowDeletion(DeletionTime deletion)
+    public void addRowDeletion(Row.Deletion deletion)
     {
         assert deletionTime == null;
         deletionTime = deletion;
     }
 
-
     public void addComplexDeletion(ColumnDefinition column, DeletionTime complexDeletion)
     {
         complexDeletions.add(Pair.create(column, complexDeletion));

http://git-wip-us.apache.org/repos/asf/cassandra/blob/06336377/test/unit/org/apache/cassandra/db/rows/RowsTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/rows/RowsTest.java b/test/unit/org/apache/cassandra/db/rows/RowsTest.java
index 306d687..7ee2d0a 100644
--- a/test/unit/org/apache/cassandra/db/rows/RowsTest.java
+++ b/test/unit/org/apache/cassandra/db/rows/RowsTest.java
@@ -149,8 +149,8 @@ public class RowsTest
             updates++;
         }
 
-        List<MergedPair<DeletionTime>> deletions = new LinkedList<>();
-        public void onDeletion(int i, Clustering clustering, DeletionTime merged, DeletionTime original)
+        List<MergedPair<Row.Deletion>> deletions = new LinkedList<>();
+        public void onDeletion(int i, Clustering clustering, Row.Deletion merged, Row.Deletion original)
         {
             updateClustering(clustering);
             deletions.add(MergedPair.create(i, merged, original));
@@ -240,7 +240,7 @@ public class RowsTest
                                                       BufferCell.live(kcvm, m, secondToTs(now), BB1, CellPath.create(BB1)),
                                                       BufferCell.live(kcvm, m, secondToTs(now), BB2, CellPath.create(BB2)));
         expectedCells.forEach(originalBuilder::addCell);
-        DeletionTime rowDeletion = new DeletionTime(ts, now);
+        Row.Deletion rowDeletion = new Row.Deletion(new DeletionTime(ts, now), false);
         originalBuilder.addRowDeletion(rowDeletion);
 
         RowBuilder builder = new RowBuilder();
@@ -268,14 +268,14 @@ public class RowsTest
                                                       BufferCell.live(kcvm, m, ts, BB1, CellPath.create(BB1)),
                                                       BufferCell.live(kcvm, m, ts, BB2, CellPath.create(BB2)));
         expectedCells.forEach(builder::addCell);
-        DeletionTime rowDeletion = new DeletionTime(ts, now);
+        Row.Deletion rowDeletion = new Row.Deletion(new DeletionTime(ts, now), false);
         builder.addRowDeletion(rowDeletion);
 
         StatsCollector collector = new StatsCollector();
         Rows.collectStats(builder.build(), collector);
 
         Assert.assertEquals(Lists.newArrayList(liveness), collector.liveness);
-        Assert.assertEquals(Sets.newHashSet(rowDeletion, complexDeletion), Sets.newHashSet(collector.deletions));
+        Assert.assertEquals(Sets.newHashSet(rowDeletion.time(), complexDeletion), Sets.newHashSet(collector.deletions));
         Assert.assertEquals(Sets.newHashSet(expectedCells), Sets.newHashSet(collector.cells));
         Assert.assertEquals(2, collector.columnCount);
         Assert.assertFalse(collector.hasLegacyCounterShards);
@@ -322,7 +322,7 @@ public class RowsTest
         List<Cell> r2ExpectedCells = Lists.newArrayList(r2v, r2m2, r2m3, r2m4);
 
         r2ExpectedCells.forEach(r2Builder::addCell);
-        DeletionTime r2RowDeletion = new DeletionTime(ts1 - 2, now2);
+        Row.Deletion r2RowDeletion = new Row.Deletion(new DeletionTime(ts1 - 2, now2), false);
         r2Builder.addRowDeletion(r2RowDeletion);
 
         Row r1 = r1Builder.build();
@@ -353,7 +353,7 @@ public class RowsTest
         Assert.assertEquals(expectedLiveness, listener.liveness);
 
         // deletions
-        List<MergedPair<DeletionTime>> expectedDeletions = Lists.newArrayList(MergedPair.create(0, r2RowDeletion, null),
+        List<MergedPair<Row.Deletion>> expectedDeletions = Lists.newArrayList(MergedPair.create(0, r2RowDeletion, null),
                                                                               MergedPair.create(1, r2RowDeletion, r2RowDeletion));
         Assert.assertEquals(expectedDeletions, listener.deletions);
 
@@ -392,7 +392,7 @@ public class RowsTest
         List<Cell> r2ExpectedCells = Lists.newArrayList(r2v, r2m2, r2m3, r2m4);
 
         r2ExpectedCells.forEach(r2Builder::addCell);
-        DeletionTime r2RowDeletion = new DeletionTime(ts1 - 1, now2);
+        Row.Deletion r2RowDeletion = new Row.Deletion(new DeletionTime(ts1 - 1, now2), false);
         r2Builder.addRowDeletion(r2RowDeletion);
 
         Row r1 = r1Builder.build();
@@ -446,7 +446,7 @@ public class RowsTest
         List<Cell> r2ExpectedCells = Lists.newArrayList(r2v, r2m2, r2m3, r2m4);
 
         r2ExpectedCells.forEach(r2Builder::addCell);
-        DeletionTime r2RowDeletion = new DeletionTime(ts1 - 1, now2);
+        Row.Deletion r2RowDeletion = new Row.Deletion(new DeletionTime(ts1 - 1, now2), false);
         r2Builder.addRowDeletion(r2RowDeletion);
 
         Row r1 = r1Builder.build();
@@ -510,7 +510,7 @@ public class RowsTest
         int now2 = now1 + 1;
         Row.Builder updateBuilder = createBuilder(c1, now2, null, BB1, BB1);
         int now3 = now2 + 1;
-        DeletionTime expectedDeletion = new DeletionTime(secondToTs(now3), now3);
+        Row.Deletion expectedDeletion = new Row.Deletion(new DeletionTime(secondToTs(now3), now3), false);
         updateBuilder.addRowDeletion(expectedDeletion);
 
         RowBuilder builder = new RowBuilder();
@@ -534,7 +534,7 @@ public class RowsTest
         int now2 = now1 + 1;
         Row.Builder updateBuilder = createBuilder(c1, now2, BB1, BB1, BB1);
         int now3 = now2 + 1;
-        DeletionTime expectedDeletion = new DeletionTime(secondToTs(now3), now3);
+        Row.Deletion expectedDeletion = new Row.Deletion(new DeletionTime(secondToTs(now3), now3), false);
         updateBuilder.addRowDeletion(expectedDeletion);
 
         RowBuilder builder = new RowBuilder();


[2/3] cassandra git commit: fix bad rebase

Posted by be...@apache.org.
fix bad rebase


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

Branch: refs/heads/trunk
Commit: 06336377f7f0dc064a9882424c82a9f47586a3da
Parents: b263af9
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Tue Sep 15 18:05:29 2015 +0100
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Tue Sep 15 18:05:29 2015 +0100

----------------------------------------------------------------------
 .../apache/cassandra/db/rows/RowBuilder.java    |  5 ++---
 .../org/apache/cassandra/db/rows/RowsTest.java  | 22 ++++++++++----------
 2 files changed, 13 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/06336377/test/unit/org/apache/cassandra/db/rows/RowBuilder.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/rows/RowBuilder.java b/test/unit/org/apache/cassandra/db/rows/RowBuilder.java
index caa5c40..b1223f1 100644
--- a/test/unit/org/apache/cassandra/db/rows/RowBuilder.java
+++ b/test/unit/org/apache/cassandra/db/rows/RowBuilder.java
@@ -36,7 +36,7 @@ public class RowBuilder implements Row.Builder
     public List<Cell> cells = new LinkedList<>();
     public Clustering clustering = null;
     public LivenessInfo livenessInfo = null;
-    public DeletionTime deletionTime = null;
+    public Row.Deletion deletionTime = null;
     public List<Pair<ColumnDefinition, DeletionTime>> complexDeletions = new LinkedList<>();
 
     public void addCell(Cell cell)
@@ -66,13 +66,12 @@ public class RowBuilder implements Row.Builder
         livenessInfo = info;
     }
 
-    public void addRowDeletion(DeletionTime deletion)
+    public void addRowDeletion(Row.Deletion deletion)
     {
         assert deletionTime == null;
         deletionTime = deletion;
     }
 
-
     public void addComplexDeletion(ColumnDefinition column, DeletionTime complexDeletion)
     {
         complexDeletions.add(Pair.create(column, complexDeletion));

http://git-wip-us.apache.org/repos/asf/cassandra/blob/06336377/test/unit/org/apache/cassandra/db/rows/RowsTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/db/rows/RowsTest.java b/test/unit/org/apache/cassandra/db/rows/RowsTest.java
index 306d687..7ee2d0a 100644
--- a/test/unit/org/apache/cassandra/db/rows/RowsTest.java
+++ b/test/unit/org/apache/cassandra/db/rows/RowsTest.java
@@ -149,8 +149,8 @@ public class RowsTest
             updates++;
         }
 
-        List<MergedPair<DeletionTime>> deletions = new LinkedList<>();
-        public void onDeletion(int i, Clustering clustering, DeletionTime merged, DeletionTime original)
+        List<MergedPair<Row.Deletion>> deletions = new LinkedList<>();
+        public void onDeletion(int i, Clustering clustering, Row.Deletion merged, Row.Deletion original)
         {
             updateClustering(clustering);
             deletions.add(MergedPair.create(i, merged, original));
@@ -240,7 +240,7 @@ public class RowsTest
                                                       BufferCell.live(kcvm, m, secondToTs(now), BB1, CellPath.create(BB1)),
                                                       BufferCell.live(kcvm, m, secondToTs(now), BB2, CellPath.create(BB2)));
         expectedCells.forEach(originalBuilder::addCell);
-        DeletionTime rowDeletion = new DeletionTime(ts, now);
+        Row.Deletion rowDeletion = new Row.Deletion(new DeletionTime(ts, now), false);
         originalBuilder.addRowDeletion(rowDeletion);
 
         RowBuilder builder = new RowBuilder();
@@ -268,14 +268,14 @@ public class RowsTest
                                                       BufferCell.live(kcvm, m, ts, BB1, CellPath.create(BB1)),
                                                       BufferCell.live(kcvm, m, ts, BB2, CellPath.create(BB2)));
         expectedCells.forEach(builder::addCell);
-        DeletionTime rowDeletion = new DeletionTime(ts, now);
+        Row.Deletion rowDeletion = new Row.Deletion(new DeletionTime(ts, now), false);
         builder.addRowDeletion(rowDeletion);
 
         StatsCollector collector = new StatsCollector();
         Rows.collectStats(builder.build(), collector);
 
         Assert.assertEquals(Lists.newArrayList(liveness), collector.liveness);
-        Assert.assertEquals(Sets.newHashSet(rowDeletion, complexDeletion), Sets.newHashSet(collector.deletions));
+        Assert.assertEquals(Sets.newHashSet(rowDeletion.time(), complexDeletion), Sets.newHashSet(collector.deletions));
         Assert.assertEquals(Sets.newHashSet(expectedCells), Sets.newHashSet(collector.cells));
         Assert.assertEquals(2, collector.columnCount);
         Assert.assertFalse(collector.hasLegacyCounterShards);
@@ -322,7 +322,7 @@ public class RowsTest
         List<Cell> r2ExpectedCells = Lists.newArrayList(r2v, r2m2, r2m3, r2m4);
 
         r2ExpectedCells.forEach(r2Builder::addCell);
-        DeletionTime r2RowDeletion = new DeletionTime(ts1 - 2, now2);
+        Row.Deletion r2RowDeletion = new Row.Deletion(new DeletionTime(ts1 - 2, now2), false);
         r2Builder.addRowDeletion(r2RowDeletion);
 
         Row r1 = r1Builder.build();
@@ -353,7 +353,7 @@ public class RowsTest
         Assert.assertEquals(expectedLiveness, listener.liveness);
 
         // deletions
-        List<MergedPair<DeletionTime>> expectedDeletions = Lists.newArrayList(MergedPair.create(0, r2RowDeletion, null),
+        List<MergedPair<Row.Deletion>> expectedDeletions = Lists.newArrayList(MergedPair.create(0, r2RowDeletion, null),
                                                                               MergedPair.create(1, r2RowDeletion, r2RowDeletion));
         Assert.assertEquals(expectedDeletions, listener.deletions);
 
@@ -392,7 +392,7 @@ public class RowsTest
         List<Cell> r2ExpectedCells = Lists.newArrayList(r2v, r2m2, r2m3, r2m4);
 
         r2ExpectedCells.forEach(r2Builder::addCell);
-        DeletionTime r2RowDeletion = new DeletionTime(ts1 - 1, now2);
+        Row.Deletion r2RowDeletion = new Row.Deletion(new DeletionTime(ts1 - 1, now2), false);
         r2Builder.addRowDeletion(r2RowDeletion);
 
         Row r1 = r1Builder.build();
@@ -446,7 +446,7 @@ public class RowsTest
         List<Cell> r2ExpectedCells = Lists.newArrayList(r2v, r2m2, r2m3, r2m4);
 
         r2ExpectedCells.forEach(r2Builder::addCell);
-        DeletionTime r2RowDeletion = new DeletionTime(ts1 - 1, now2);
+        Row.Deletion r2RowDeletion = new Row.Deletion(new DeletionTime(ts1 - 1, now2), false);
         r2Builder.addRowDeletion(r2RowDeletion);
 
         Row r1 = r1Builder.build();
@@ -510,7 +510,7 @@ public class RowsTest
         int now2 = now1 + 1;
         Row.Builder updateBuilder = createBuilder(c1, now2, null, BB1, BB1);
         int now3 = now2 + 1;
-        DeletionTime expectedDeletion = new DeletionTime(secondToTs(now3), now3);
+        Row.Deletion expectedDeletion = new Row.Deletion(new DeletionTime(secondToTs(now3), now3), false);
         updateBuilder.addRowDeletion(expectedDeletion);
 
         RowBuilder builder = new RowBuilder();
@@ -534,7 +534,7 @@ public class RowsTest
         int now2 = now1 + 1;
         Row.Builder updateBuilder = createBuilder(c1, now2, BB1, BB1, BB1);
         int now3 = now2 + 1;
-        DeletionTime expectedDeletion = new DeletionTime(secondToTs(now3), now3);
+        Row.Deletion expectedDeletion = new Row.Deletion(new DeletionTime(secondToTs(now3), now3), false);
         updateBuilder.addRowDeletion(expectedDeletion);
 
         RowBuilder builder = new RowBuilder();


[3/3] cassandra git commit: Merge branch 'cassandra-3.0' into trunk

Posted by be...@apache.org.
Merge branch 'cassandra-3.0' into trunk


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

Branch: refs/heads/trunk
Commit: 7a0698ee1bbcef4694a80e98a5cbcefbd59ed5f7
Parents: ac3b1cc 0633637
Author: Benedict Elliott Smith <be...@apache.org>
Authored: Tue Sep 15 18:05:35 2015 +0100
Committer: Benedict Elliott Smith <be...@apache.org>
Committed: Tue Sep 15 18:05:35 2015 +0100

----------------------------------------------------------------------
 .../apache/cassandra/db/rows/RowBuilder.java    |  5 ++---
 .../org/apache/cassandra/db/rows/RowsTest.java  | 22 ++++++++++----------
 2 files changed, 13 insertions(+), 14 deletions(-)
----------------------------------------------------------------------