cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xe...@apache.org
Subject [2/3] git commit: fix isDeterministic + CqlReader
Date Thu, 13 Feb 2014 19:15:12 GMT
fix isDeterministic + CqlReader


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

Branch: refs/heads/trunk
Commit: c8690872674cc18de35efeca7ac6da280c6647f0
Parents: 84f2b89 79c6ecc
Author: belliottsmith <github@sub.laerad.com>
Authored: Thu Feb 13 16:39:16 2014 +0000
Committer: belliottsmith <github@sub.laerad.com>
Committed: Thu Feb 13 16:39:16 2014 +0000

----------------------------------------------------------------------
 CHANGES.txt                                     |   9 +-
 .../db/AbstractThreadUnsafeSortedColumns.java   |  70 ------------
 .../cassandra/db/ArrayBackedSortedColumns.java  |  50 ++++++++-
 .../org/apache/cassandra/db/ColumnFamily.java   |   8 --
 .../org/apache/cassandra/db/EmptyColumns.java   | 112 -------------------
 src/java/org/apache/cassandra/db/Mutation.java  |   2 +-
 .../org/apache/cassandra/db/SystemKeyspace.java |   2 +-
 .../db/columniterator/IndexedSliceReader.java   |   2 +-
 .../db/columniterator/SimpleSliceReader.java    |   2 +-
 .../db/compaction/LazilyCompactedRow.java       |   2 +-
 .../db/compaction/LeveledManifest.java          |  23 +---
 .../apache/cassandra/db/filter/ColumnSlice.java |  49 --------
 .../db/index/composites/CompositesSearcher.java |   2 +-
 .../io/sstable/SSTableIdentityIterator.java     |   2 +-
 .../cassandra/service/CassandraDaemon.java      |   7 +-
 .../cassandra/service/MigrationManager.java     |  18 ++-
 .../apache/cassandra/service/ReadCallback.java  |   4 +-
 .../apache/cassandra/service/StorageProxy.java  |   4 +-
 .../cassandra/service/StorageService.java       |   1 -
 .../cassandra/service/pager/QueryPagers.java    |   2 +-
 .../apache/cassandra/service/paxos/Commit.java  |   4 +-
 .../cassandra/db/RangeTombstoneListTest.java    |   6 -
 test/unit/org/apache/cassandra/db/RowTest.java  |   2 +-
 .../locator/OldNetworkTopologyStrategyTest.java |  12 +-
 ...2.0.0-rc2-SNAPSHOT-jar-with-dependencies.jar | Bin 5869229 -> 0 bytes
 ...cassandra-driver-core-2.0.0-rc2-SNAPSHOT.jar | Bin 490145 -> 0 bytes
 ...cassandra-driver-core-2.0.0-rc3-SNAPSHOT.jar | Bin 0 -> 515357 bytes
 .../apache/cassandra/stress/StressAction.java   |   6 +-
 .../generatedata/DataGenStringDictionary.java   |   6 +-
 .../generatedata/DataGenStringRepeats.java      |   2 +-
 .../generatedata/RowGenDistributedSize.java     |   6 +-
 .../stress/operations/CqlOperation.java         |  29 ++---
 .../cassandra/stress/settings/SettingsKey.java  |   7 +-
 .../cassandra/stress/util/JavaDriverClient.java |   9 +-
 34 files changed, 122 insertions(+), 338 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/c8690872/tools/stress/src/org/apache/cassandra/stress/generatedata/RowGenDistributedSize.java
----------------------------------------------------------------------
diff --cc tools/stress/src/org/apache/cassandra/stress/generatedata/RowGenDistributedSize.java
index b68ab3c,b68ab3c..6749eae
--- a/tools/stress/src/org/apache/cassandra/stress/generatedata/RowGenDistributedSize.java
+++ b/tools/stress/src/org/apache/cassandra/stress/generatedata/RowGenDistributedSize.java
@@@ -21,6 -21,6 +21,8 @@@ public class RowGenDistributedSize exte
      final ByteBuffer[] ret;
      final int[] sizes;
  
++    final boolean isDeterministic;
++
      public RowGenDistributedSize(DataGen dataGenerator, Distribution countDistribution,
Distribution sizeDistribution)
      {
          super(dataGenerator);
@@@ -28,6 -28,6 +30,8 @@@
          this.sizeDistribution = sizeDistribution;
          ret = new ByteBuffer[(int) countDistribution.maxValue()];
          sizes = new int[ret.length];
++        this.isDeterministic = dataGen.isDeterministic() && countDistribution.maxValue()
== countDistribution.minValue()
++            && sizeDistribution.minValue() == sizeDistribution.maxValue();
      }
  
      ByteBuffer getBuffer(int size)
@@@ -78,7 -78,7 +82,7 @@@
      @Override
      public boolean isDeterministic()
      {
--        return false;
++        return isDeterministic;
      }
  
  }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/c8690872/tools/stress/src/org/apache/cassandra/stress/operations/CqlOperation.java
----------------------------------------------------------------------
diff --cc tools/stress/src/org/apache/cassandra/stress/operations/CqlOperation.java
index bd2f131,78dd461..b17f520
--- a/tools/stress/src/org/apache/cassandra/stress/operations/CqlOperation.java
+++ b/tools/stress/src/org/apache/cassandra/stress/operations/CqlOperation.java
@@@ -192,8 -192,8 +192,12 @@@ public abstract class CqlOperation<V> e
              if (result.length != expect.size())
                  return false;
              for (int i = 0 ; i < result.length ; i++)
--                if (!expect.get(i).equals(Arrays.asList(result[i])))
++            {
++                List<ByteBuffer> resultRow = Arrays.asList(result[i]);
++                resultRow = resultRow.subList(1, resultRow.size());
++                if (expect.get(i) != null && !expect.get(i).equals(resultRow))
                      return false;
++            }
              return true;
          }
      }


Mime
View raw message