cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jasobr...@apache.org
Subject [6/6] cassandra git commit: Merge branch 'cassandra-3.11' into trunk
Date Thu, 19 Jan 2017 22:15:06 GMT
Merge branch 'cassandra-3.11' into trunk


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

Branch: refs/heads/trunk
Commit: d6da7b79903183e1b21f447098a1e01034152bb1
Parents: c3d7244 e3d26b6
Author: Jason Brown <jasedbrown@gmail.com>
Authored: Thu Jan 19 14:13:40 2017 -0800
Committer: Jason Brown <jasedbrown@gmail.com>
Committed: Thu Jan 19 14:14:24 2017 -0800

----------------------------------------------------------------------
 CHANGES.txt                                     |   1 +
 .../cassandra/index/SecondaryIndexManager.java  |  86 ++++++++++-----
 .../service/pager/AbstractQueryPager.java       |  56 ++++++++--
 .../apache/cassandra/index/CustomIndexTest.java | 106 +++++++++++++++++++
 .../org/apache/cassandra/index/StubIndex.java   |   4 +
 5 files changed, 216 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6da7b79/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index cc16a8f,224ef5d..ebf161d
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -139,12 -109,14 +139,13 @@@
   * Remove pre-startup check for open JMX port (CASSANDRA-12074)
   * Remove compaction Severity from DynamicEndpointSnitch (CASSANDRA-11738)
   * Restore resumable hints delivery (CASSANDRA-11960)
 - * Properly report LWT contention (CASSANDRA-12626)
 + * Properly record CAS contention (CASSANDRA-12626)
  Merged from 3.0:
+  * Indexer is not correctly invoked when building indexes over sstables (CASSANDRA-13075)
 + * Stress daemon help is incorrect (CASSANDRA-12563)
   * Read repair is not blocking repair to finish in foreground repair (CASSANDRA-13115)
 - * Stress daemon help is incorrect(CASSANDRA-12563)
 - * Remove ALTER TYPE support (CASSANDRA-12443)
 - * Fix assertion for certain legacy range tombstone pattern (CASSANDRA-12203)
   * Replace empty strings with null values if they cannot be converted (CASSANDRA-12794)
 + * Remove support for non-JavaScript UDFs (CASSANDRA-12883)
   * Fix deserialization of 2.x DeletedCells (CASSANDRA-12620)
   * Add parent repair session id to anticompaction log message (CASSANDRA-12186)
   * Improve contention handling on failure to acquire MV lock for streaming and hints (CASSANDRA-12905)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d6da7b79/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
index 22ddc84,e937a0d..8a04108
--- a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
@@@ -78,10 -77,49 +77,49 @@@ abstract class AbstractQueryPager imple
          return Transformation.apply(nextPageReadCommand(pageSize).executeInternal(executionController),
pager);
      }
  
-     private class Pager extends Transformation<RowIterator>
+     public UnfilteredPartitionIterator fetchPageUnfiltered(CFMetaData cfm, int pageSize,
ReadExecutionController executionController)
+     {
+         if (isExhausted())
 -            return EmptyIterators.unfilteredPartition(cfm, false);
++            return EmptyIterators.unfilteredPartition(cfm);
+ 
+         pageSize = Math.min(pageSize, remaining);
+         UnfilteredPager pager = new UnfilteredPager(limits.forPaging(pageSize), command.nowInSec());
+ 
+         return Transformation.apply(nextPageReadCommand(pageSize).executeLocally(executionController),
pager);
+     }
+ 
+     private class UnfilteredPager extends Pager<Unfiltered>
+     {
+ 
+         private UnfilteredPager(DataLimits pageLimits, int nowInSec)
+         {
+             super(pageLimits, nowInSec);
+         }
+ 
+         protected BaseRowIterator<Unfiltered> apply(BaseRowIterator<Unfiltered>
partition)
+         {
+             return Transformation.apply(counter.applyTo((UnfilteredRowIterator) partition),
this);
+         }
+     }
+ 
+     private class RowPager extends Pager<Row>
+     {
+ 
+         private RowPager(DataLimits pageLimits, int nowInSec)
+         {
+             super(pageLimits, nowInSec);
+         }
+ 
+         protected BaseRowIterator<Row> apply(BaseRowIterator<Row> partition)
+         {
+             return Transformation.apply(counter.applyTo((RowIterator) partition), this);
+         }
+     }
+ 
+     private abstract class Pager<T extends Unfiltered> extends Transformation<BaseRowIterator<T>>
      {
          private final DataLimits pageLimits;
-         private final DataLimits.Counter counter;
+         protected final DataLimits.Counter counter;
          private DecoratedKey currentKey;
          private Row lastRow;
          private boolean isFirstPartition = true;


Mime
View raw message