cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject [51/51] [partial] cassandra git commit: Storage engine refactor, a.k.a CASSANDRA-8099
Date Tue, 30 Jun 2015 10:48:15 GMT
Storage engine refactor, a.k.a CASSANDRA-8099

Initial patch, see ticket for details


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

Branch: refs/heads/trunk
Commit: a991b64811f4d6adb6c7b31c0df52288eb06cf19
Parents: 5c31a86
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Mon Sep 1 18:54:46 2014 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Tue Jun 30 12:47:01 2015 +0200

----------------------------------------------------------------------
 bin/sstablekeys                                 |   56 -
 bin/sstablekeys.bat                             |   41 -
 build.xml                                       |    2 +-
 guide_8099.md                                   |  376 +++
 .../apache/cassandra/cache/AutoSavingCache.java |    2 +-
 .../apache/cassandra/cache/CounterCacheKey.java |   29 +-
 .../org/apache/cassandra/cache/OHCProvider.java |    8 +-
 .../cache/SerializingCacheProvider.java         |    9 +-
 .../org/apache/cassandra/config/CFMetaData.java | 1026 +++----
 .../cassandra/config/ColumnDefinition.java      |  201 +-
 .../cassandra/config/DatabaseDescriptor.java    |    8 +-
 .../config/YamlConfigurationLoader.java         |    7 +-
 .../org/apache/cassandra/cql3/Attributes.java   |    7 +-
 src/java/org/apache/cassandra/cql3/CQL3Row.java |   41 -
 .../apache/cassandra/cql3/ColumnCondition.java  |  156 +-
 .../apache/cassandra/cql3/ColumnIdentifier.java |   70 +-
 .../org/apache/cassandra/cql3/Constants.java    |   31 +-
 src/java/org/apache/cassandra/cql3/Cql.g        |   47 +-
 src/java/org/apache/cassandra/cql3/Lists.java   |  113 +-
 src/java/org/apache/cassandra/cql3/Maps.java    |   52 +-
 .../cassandra/cql3/MultiColumnRelation.java     |   10 +-
 .../org/apache/cassandra/cql3/Operation.java    |   14 +-
 .../org/apache/cassandra/cql3/Operator.java     |   70 +-
 .../apache/cassandra/cql3/QueryProcessor.java   |   69 +-
 src/java/org/apache/cassandra/cql3/Sets.java    |   51 +-
 .../cassandra/cql3/SingleColumnRelation.java    |   27 +-
 .../apache/cassandra/cql3/TokenRelation.java    |    4 +-
 .../apache/cassandra/cql3/UntypedResultSet.java |   45 +-
 .../apache/cassandra/cql3/UpdateParameters.java |  158 +-
 .../cassandra/cql3/functions/TokenFct.java      |    7 +-
 .../AbstractPrimaryKeyRestrictions.java         |   11 +-
 .../cql3/restrictions/AbstractRestriction.java  |   14 +-
 .../ForwardingPrimaryKeyRestrictions.java       |   27 +-
 .../restrictions/MultiColumnRestriction.java    |   70 +-
 .../restrictions/PrimaryKeyRestrictionSet.java  |  104 +-
 .../restrictions/PrimaryKeyRestrictions.java    |    9 +-
 .../cql3/restrictions/Restriction.java          |   32 +-
 .../cql3/restrictions/RestrictionSet.java       |   12 +-
 .../cql3/restrictions/Restrictions.java         |   15 +-
 .../ReversedPrimaryKeyRestrictions.java         |   77 -
 .../restrictions/SingleColumnRestriction.java   |  133 +-
 .../restrictions/StatementRestrictions.java     |  146 +-
 .../cql3/restrictions/TokenFilter.java          |   11 +-
 .../cql3/restrictions/TokenRestriction.java     |   49 +-
 .../cassandra/cql3/selection/Selection.java     |   55 +-
 .../cassandra/cql3/selection/Selector.java      |    2 +-
 .../cql3/statements/AlterTableStatement.java    |   80 +-
 .../cql3/statements/AlterTypeStatement.java     |   41 +-
 .../cql3/statements/BatchStatement.java         |  175 +-
 .../cql3/statements/CQL3CasRequest.java         |  186 +-
 .../cql3/statements/CreateIndexStatement.java   |   18 +-
 .../cql3/statements/CreateTableStatement.java   |  290 +-
 .../cql3/statements/DeleteStatement.java        |   65 +-
 .../cql3/statements/DropTypeStatement.java      |    6 -
 .../cql3/statements/ModificationStatement.java  |  342 ++-
 .../cql3/statements/SelectStatement.java        |  709 +++--
 .../cql3/statements/UpdateStatement.java        |  126 +-
 .../org/apache/cassandra/db/AbstractCell.java   |  236 --
 .../cassandra/db/AbstractClusteringPrefix.java  |   93 +
 .../cassandra/db/AbstractLivenessInfo.java      |  164 ++
 .../apache/cassandra/db/AbstractNativeCell.java |  710 -----
 .../cassandra/db/AbstractRangeCommand.java      |  101 -
 src/java/org/apache/cassandra/db/Aliasable.java |   62 +
 .../cassandra/db/ArrayBackedSortedColumns.java  |  774 ------
 .../apache/cassandra/db/AtomDeserializer.java   |  128 -
 .../apache/cassandra/db/AtomicBTreeColumns.java |  578 ----
 .../apache/cassandra/db/BatchlogManager.java    |   21 +-
 .../org/apache/cassandra/db/BufferCell.java     |  103 -
 .../apache/cassandra/db/BufferCounterCell.java  |  176 --
 .../cassandra/db/BufferCounterUpdateCell.java   |   96 -
 .../apache/cassandra/db/BufferDeletedCell.java  |  118 -
 .../apache/cassandra/db/BufferExpiringCell.java |  187 --
 src/java/org/apache/cassandra/db/CBuilder.java  |  231 ++
 .../org/apache/cassandra/db/CFRowAdder.java     |  121 -
 src/java/org/apache/cassandra/db/Cell.java      |   69 -
 .../org/apache/cassandra/db/Clusterable.java    |   27 +
 .../org/apache/cassandra/db/Clustering.java     |  171 ++
 .../cassandra/db/ClusteringComparator.java      |  291 ++
 .../apache/cassandra/db/ClusteringPrefix.java   |  513 ++++
 .../cassandra/db/CollationController.java       |  334 ---
 .../org/apache/cassandra/db/ColumnFamily.java   |  565 ----
 .../cassandra/db/ColumnFamilySerializer.java    |  172 --
 .../apache/cassandra/db/ColumnFamilyStore.java  |  661 +----
 .../apache/cassandra/db/ColumnFamilyType.java   |   40 -
 .../org/apache/cassandra/db/ColumnIndex.java    |  226 +-
 .../apache/cassandra/db/ColumnSerializer.java   |  188 --
 src/java/org/apache/cassandra/db/Columns.java   |  535 ++++
 .../org/apache/cassandra/db/CompactTables.java  |  176 ++
 src/java/org/apache/cassandra/db/Conflicts.java |   79 +
 .../org/apache/cassandra/db/CounterCell.java    |   44 -
 .../apache/cassandra/db/CounterMutation.java    |  213 +-
 .../apache/cassandra/db/CounterUpdateCell.java  |   30 -
 src/java/org/apache/cassandra/db/DataRange.java |  468 ++--
 .../org/apache/cassandra/db/DecoratedKey.java   |   10 +-
 .../org/apache/cassandra/db/DeletedCell.java    |   30 -
 .../org/apache/cassandra/db/DeletionInfo.java   |  300 +--
 .../org/apache/cassandra/db/DeletionTime.java   |   82 +-
 .../apache/cassandra/db/DeletionTimeArray.java  |  153 ++
 .../org/apache/cassandra/db/ExpiringCell.java   |   44 -
 .../cassandra/db/HintedHandOffManager.java      |  263 +-
 src/java/org/apache/cassandra/db/IMutation.java |    7 +-
 .../apache/cassandra/db/IndexExpression.java    |  121 -
 src/java/org/apache/cassandra/db/Keyspace.java  |   61 +-
 .../org/apache/cassandra/db/LegacyLayout.java   | 1301 +++++++++
 .../org/apache/cassandra/db/LivenessInfo.java   |  186 ++
 .../apache/cassandra/db/LivenessInfoArray.java  |  174 ++
 src/java/org/apache/cassandra/db/Memtable.java  |  265 +-
 .../org/apache/cassandra/db/MultiCBuilder.java  |  436 +++
 src/java/org/apache/cassandra/db/Mutation.java  |  225 +-
 .../org/apache/cassandra/db/NativeCell.java     |   88 -
 .../apache/cassandra/db/NativeCounterCell.java  |  186 --
 .../apache/cassandra/db/NativeDeletedCell.java  |  119 -
 .../apache/cassandra/db/NativeExpiringCell.java |  190 --
 .../org/apache/cassandra/db/OnDiskAtom.java     |  102 -
 .../apache/cassandra/db/PagedRangeCommand.java  |  224 --
 .../apache/cassandra/db/PartitionColumns.java   |  184 ++
 .../apache/cassandra/db/PartitionPosition.java  |  112 +
 .../cassandra/db/PartitionRangeReadCommand.java |  288 ++
 .../apache/cassandra/db/RangeSliceCommand.java  |  246 --
 .../apache/cassandra/db/RangeSliceReply.java    |   92 -
 .../org/apache/cassandra/db/RangeTombstone.java |  382 +--
 .../apache/cassandra/db/RangeTombstoneList.java |  586 ++--
 .../org/apache/cassandra/db/ReadCommand.java    |  512 +++-
 .../cassandra/db/ReadCommandVerbHandler.java    |   50 +
 .../org/apache/cassandra/db/ReadOrderGroup.java |  133 +
 src/java/org/apache/cassandra/db/ReadQuery.java |  118 +
 .../org/apache/cassandra/db/ReadResponse.java   |  239 +-
 .../apache/cassandra/db/ReadVerbHandler.java    |   58 -
 .../db/RetriedSliceFromReadCommand.java         |   56 -
 .../apache/cassandra/db/ReusableClustering.java |   82 +
 .../cassandra/db/ReusableClusteringPrefix.java  |   57 +
 .../cassandra/db/ReusableLivenessInfo.java      |   65 +
 src/java/org/apache/cassandra/db/Row.java       |   88 -
 .../org/apache/cassandra/db/RowIndexEntry.java  |   35 +-
 .../apache/cassandra/db/RowIteratorFactory.java |  172 --
 .../org/apache/cassandra/db/RowPosition.java    |  113 -
 .../apache/cassandra/db/RowUpdateBuilder.java   |  316 +++
 .../cassandra/db/SerializationHeader.java       |  488 ++++
 .../org/apache/cassandra/db/Serializers.java    |   71 +
 .../apache/cassandra/db/SimpleClustering.java   |   93 +
 .../apache/cassandra/db/SimpleDeletionTime.java |   61 +
 .../apache/cassandra/db/SimpleLivenessInfo.java |   75 +
 .../db/SinglePartitionNamesCommand.java         |  249 ++
 .../db/SinglePartitionReadCommand.java          |  498 ++++
 .../db/SinglePartitionSliceCommand.java         |  232 ++
 src/java/org/apache/cassandra/db/Slice.java     |  652 +++++
 .../cassandra/db/SliceByNamesReadCommand.java   |  125 -
 .../cassandra/db/SliceFromReadCommand.java      |  207 --
 src/java/org/apache/cassandra/db/Slices.java    |  898 +++++++
 .../org/apache/cassandra/db/SuperColumns.java   |  230 --
 .../org/apache/cassandra/db/SystemKeyspace.java |   85 +-
 .../cassandra/db/UnfilteredDeserializer.java    |  414 +++
 .../cassandra/db/UnknownColumnException.java    |   51 +
 .../columniterator/AbstractSSTableIterator.java |  424 +++
 .../columniterator/IColumnIteratorFactory.java  |   44 -
 .../db/columniterator/IdentityQueryFilter.java  |   38 -
 .../db/columniterator/LazyColumnIterator.java   |  100 -
 .../db/columniterator/OnDiskAtomIterator.java   |   42 -
 .../db/columniterator/SSTableIterator.java      |  292 ++
 .../columniterator/SSTableReversedIterator.java |  388 +++
 .../db/commitlog/CommitLogArchiver.java         |    2 +-
 .../db/commitlog/CommitLogDescriptor.java       |    5 +-
 .../db/commitlog/CommitLogReplayer.java         |   41 +-
 .../db/commitlog/CommitLogSegment.java          |    8 +-
 .../db/compaction/AbstractCompactedRow.java     |   65 -
 .../compaction/AbstractCompactionIterable.java  |   83 -
 .../compaction/AbstractCompactionStrategy.java  |    1 +
 .../db/compaction/CompactionController.java     |    8 +-
 .../db/compaction/CompactionIterable.java       |   96 -
 .../db/compaction/CompactionIterator.java       |  299 +++
 .../db/compaction/CompactionManager.java        |  235 +-
 .../compaction/CompactionStrategyManager.java   |   20 +-
 .../cassandra/db/compaction/CompactionTask.java |  100 +-
 .../db/compaction/LazilyCompactedRow.java       |  346 ---
 .../compaction/LeveledCompactionStrategy.java   |   54 +-
 .../db/compaction/LeveledManifest.java          |   19 +-
 .../cassandra/db/compaction/Scrubber.java       |  118 +-
 .../cassandra/db/compaction/Upgrader.java       |   21 +-
 .../cassandra/db/compaction/Verifier.java       |   20 +-
 .../writers/CompactionAwareWriter.java          |   12 +-
 .../writers/DefaultCompactionWriter.java        |   12 +-
 .../writers/MajorLeveledCompactionWriter.java   |   15 +-
 .../writers/MaxSSTableSizeWriter.java           |   15 +-
 .../SplittingSizeTieredCompactionWriter.java    |   15 +-
 .../cassandra/db/composites/AbstractCType.java  |  394 ---
 .../db/composites/AbstractCellNameType.java     |  454 ----
 .../db/composites/AbstractComposite.java        |  141 -
 .../AbstractCompoundCellNameType.java           |  295 --
 .../composites/AbstractSimpleCellNameType.java  |  210 --
 .../db/composites/BoundedComposite.java         |  104 -
 .../cassandra/db/composites/CBuilder.java       |   36 -
 .../apache/cassandra/db/composites/CType.java   |  141 -
 .../cassandra/db/composites/CellName.java       |   78 -
 .../cassandra/db/composites/CellNameType.java   |  215 --
 .../cassandra/db/composites/CellNames.java      |  109 -
 .../cassandra/db/composites/Composite.java      |   78 -
 .../cassandra/db/composites/Composites.java     |  150 --
 .../db/composites/CompositesBuilder.java        |  313 ---
 .../cassandra/db/composites/CompoundCType.java  |  180 --
 .../db/composites/CompoundComposite.java        |   88 -
 .../db/composites/CompoundDenseCellName.java    |   86 -
 .../composites/CompoundDenseCellNameType.java   |   87 -
 .../db/composites/CompoundSparseCellName.java   |  182 --
 .../composites/CompoundSparseCellNameType.java  |  330 ---
 .../cassandra/db/composites/SimpleCType.java    |  156 --
 .../db/composites/SimpleComposite.java          |   79 -
 .../db/composites/SimpleDenseCellName.java      |   83 -
 .../db/composites/SimpleDenseCellNameType.java  |   80 -
 .../db/composites/SimpleSparseCellName.java     |  104 -
 .../db/composites/SimpleSparseCellNameType.java |  100 -
 .../SimpleSparseInternedCellName.java           |   51 -
 .../cassandra/db/context/CounterContext.java    |    7 +-
 .../filter/AbstractClusteringIndexFilter.java   |  110 +
 .../db/filter/ClusteringIndexFilter.java        |  152 ++
 .../db/filter/ClusteringIndexNamesFilter.java   |  271 ++
 .../db/filter/ClusteringIndexSliceFilter.java   |  179 ++
 .../cassandra/db/filter/ColumnCounter.java      |  217 --
 .../cassandra/db/filter/ColumnFilter.java       |  437 +++
 .../apache/cassandra/db/filter/ColumnSlice.java |  289 --
 .../cassandra/db/filter/ColumnSubselection.java |  233 ++
 .../apache/cassandra/db/filter/DataLimits.java  |  737 +++++
 .../cassandra/db/filter/ExtendedFilter.java     |  499 ----
 .../cassandra/db/filter/IDiskAtomFilter.java    |  146 -
 .../cassandra/db/filter/NamesQueryFilter.java   |  301 ---
 .../apache/cassandra/db/filter/QueryFilter.java |  262 --
 .../apache/cassandra/db/filter/RowFilter.java   |  784 ++++++
 .../cassandra/db/filter/SliceQueryFilter.java   |  583 ----
 .../filter/TombstoneOverwhelmingException.java  |   72 +-
 .../AbstractSimplePerColumnSecondaryIndex.java  |  155 +-
 .../db/index/PerColumnSecondaryIndex.java       |   62 +-
 .../db/index/PerRowSecondaryIndex.java          |   26 +-
 .../cassandra/db/index/SecondaryIndex.java      |   72 +-
 .../db/index/SecondaryIndexBuilder.java         |   30 +-
 .../db/index/SecondaryIndexManager.java         |  461 ++--
 .../db/index/SecondaryIndexSearcher.java        |  214 +-
 .../db/index/composites/CompositesIndex.java    |  118 +-
 .../CompositesIndexIncludingCollectionKey.java  |   51 +-
 .../CompositesIndexOnClusteringKey.java         |   87 +-
 .../CompositesIndexOnCollectionKey.java         |   15 +-
 .../CompositesIndexOnCollectionKeyAndValue.java |   52 +-
 .../CompositesIndexOnCollectionValue.java       |   82 +-
 .../CompositesIndexOnPartitionKey.java          |   60 +-
 .../composites/CompositesIndexOnRegular.java    |   61 +-
 .../db/index/composites/CompositesSearcher.java |  432 ++-
 .../cassandra/db/index/keys/KeysIndex.java      |   59 +-
 .../cassandra/db/index/keys/KeysSearcher.java   |  289 +-
 .../db/lifecycle/SSTableIntervalTree.java       |   14 +-
 .../org/apache/cassandra/db/lifecycle/View.java |    8 +-
 .../cassandra/db/marshal/AbstractType.java      |   64 +
 .../cassandra/db/marshal/BooleanType.java       |    6 +
 .../cassandra/db/marshal/CollectionType.java    |   67 +-
 .../db/marshal/ColumnToCollectionType.java      |    3 +
 .../cassandra/db/marshal/CompositeType.java     |   25 +-
 .../cassandra/db/marshal/CounterColumnType.java |    7 +
 .../apache/cassandra/db/marshal/DateType.java   |    6 +
 .../apache/cassandra/db/marshal/DoubleType.java |    6 +
 .../apache/cassandra/db/marshal/EmptyType.java  |    6 +
 .../apache/cassandra/db/marshal/FloatType.java  |    6 +
 .../apache/cassandra/db/marshal/Int32Type.java  |    5 +
 .../cassandra/db/marshal/LexicalUUIDType.java   |    6 +
 .../apache/cassandra/db/marshal/ListType.java   |   11 +-
 .../db/marshal/LocalByPartionerType.java        |   12 +-
 .../apache/cassandra/db/marshal/LongType.java   |    5 +
 .../apache/cassandra/db/marshal/MapType.java    |   16 +-
 .../cassandra/db/marshal/ReversedType.java      |   12 +
 .../apache/cassandra/db/marshal/SetType.java    |   11 +-
 .../cassandra/db/marshal/TimeUUIDType.java      |    6 +
 .../cassandra/db/marshal/TimestampType.java     |    6 +
 .../apache/cassandra/db/marshal/UUIDType.java   |    6 +
 .../db/partitions/AbstractPartitionData.java    |  831 ++++++
 .../AbstractUnfilteredPartitionIterator.java    |   30 +
 .../partitions/ArrayBackedCachedPartition.java  |  256 ++
 .../db/partitions/ArrayBackedPartition.java     |  104 +
 .../db/partitions/AtomicBTreePartition.java     |  819 ++++++
 .../db/partitions/CachedPartition.java          |   96 +
 .../partitions/CountingPartitionIterator.java   |   58 +
 .../db/partitions/CountingRowIterator.java      |   58 +
 .../CountingUnfilteredPartitionIterator.java    |   52 +
 .../CountingUnfilteredRowIterator.java          |   64 +
 .../db/partitions/FilteredPartition.java        |  142 +
 .../partitions/FilteringPartitionIterator.java  |  146 +
 .../cassandra/db/partitions/Partition.java      |   70 +
 .../db/partitions/PartitionIterator.java        |   39 +
 .../db/partitions/PartitionIterators.java       |  198 ++
 .../db/partitions/PartitionUpdate.java          |  764 ++++++
 .../SingletonUnfilteredPartitionIterator.java   |   64 +
 .../TombstonePurgingPartitionIterator.java      |  103 +
 .../partitions/UnfilteredPartitionIterator.java |   46 +
 .../UnfilteredPartitionIterators.java           |  503 ++++
 .../partitions/WrappingPartitionIterator.java   |   50 +
 .../WrappingUnfilteredPartitionIterator.java    |  120 +
 .../apache/cassandra/db/rows/AbstractCell.java  |  135 +
 .../db/rows/AbstractRangeTombstoneMarker.java   |   71 +
 .../cassandra/db/rows/AbstractReusableRow.java  |  207 ++
 .../apache/cassandra/db/rows/AbstractRow.java   |  209 ++
 .../db/rows/AbstractUnfilteredRowIterator.java  |  107 +
 src/java/org/apache/cassandra/db/rows/Cell.java |  142 +
 .../org/apache/cassandra/db/rows/CellData.java  |  275 ++
 .../org/apache/cassandra/db/rows/CellPath.java  |  127 +
 .../org/apache/cassandra/db/rows/Cells.java     |  371 +++
 .../apache/cassandra/db/rows/ColumnData.java    |   61 +
 .../cassandra/db/rows/ComplexRowDataBlock.java  |  796 ++++++
 .../apache/cassandra/db/rows/CounterCells.java  |   32 +
 .../apache/cassandra/db/rows/FilteringRow.java  |  121 +
 .../cassandra/db/rows/FilteringRowIterator.java |  126 +
 .../LazilyInitializedUnfilteredRowIterator.java |  103 +
 .../cassandra/db/rows/MemtableRowData.java      |  204 ++
 .../db/rows/RangeTombstoneBoundMarker.java      |  156 ++
 .../db/rows/RangeTombstoneBoundaryMarker.java   |  173 ++
 .../cassandra/db/rows/RangeTombstoneMarker.java |  283 ++
 .../apache/cassandra/db/rows/ReusableRow.java   |  104 +
 src/java/org/apache/cassandra/db/rows/Row.java  |  555 ++++
 .../db/rows/RowAndTombstoneMergeIterator.java   |  170 ++
 .../apache/cassandra/db/rows/RowDataBlock.java  |  275 ++
 .../apache/cassandra/db/rows/RowIterator.java   |   76 +
 .../apache/cassandra/db/rows/RowIterators.java  |  152 ++
 .../org/apache/cassandra/db/rows/RowStats.java  |  237 ++
 src/java/org/apache/cassandra/db/rows/Rows.java |  205 ++
 .../cassandra/db/rows/SerializationHelper.java  |  137 +
 .../cassandra/db/rows/SimpleRowDataBlock.java   |  188 ++
 .../db/rows/SliceableUnfilteredRowIterator.java |   39 +
 .../org/apache/cassandra/db/rows/StaticRow.java |  193 ++
 .../db/rows/TombstoneFilteringRow.java          |   49 +
 .../apache/cassandra/db/rows/Unfiltered.java    |   60 +
 .../db/rows/UnfilteredRowIterator.java          |  102 +
 .../rows/UnfilteredRowIteratorSerializer.java   |  306 +++
 .../db/rows/UnfilteredRowIterators.java         |  770 ++++++
 .../cassandra/db/rows/UnfilteredSerializer.java |  706 +++++
 .../apache/cassandra/db/rows/WrappingRow.java   |  214 ++
 .../cassandra/db/rows/WrappingRowIterator.java  |   79 +
 .../db/rows/WrappingUnfilteredRowIterator.java  |   89 +
 .../apache/cassandra/dht/AbstractBounds.java    |    9 +-
 src/java/org/apache/cassandra/dht/Bounds.java   |   16 +-
 .../apache/cassandra/dht/ExcludingBounds.java   |   10 +
 .../cassandra/dht/IncludingExcludingBounds.java |   10 +
 src/java/org/apache/cassandra/dht/Range.java    |   19 +-
 src/java/org/apache/cassandra/dht/Token.java    |   10 +-
 .../io/sstable/AbstractSSTableSimpleWriter.java |  143 +-
 .../cassandra/io/sstable/CQLSSTableWriter.java  |  110 +-
 .../cassandra/io/sstable/ColumnNameHelper.java  |  241 --
 .../cassandra/io/sstable/ColumnStats.java       |  165 --
 .../io/sstable/CorruptSSTableException.java     |    2 +-
 .../apache/cassandra/io/sstable/Descriptor.java |    3 +-
 .../cassandra/io/sstable/ISSTableScanner.java   |    5 +-
 .../cassandra/io/sstable/IndexHelper.java       |  132 +-
 .../cassandra/io/sstable/IndexSummary.java      |    7 +-
 .../io/sstable/ReducingKeyIterator.java         |    2 +-
 .../io/sstable/SSTableIdentityIterator.java     |  143 +-
 .../cassandra/io/sstable/SSTableRewriter.java   |   36 +-
 .../io/sstable/SSTableSimpleIterator.java       |  176 ++
 .../io/sstable/SSTableSimpleUnsortedWriter.java |  255 +-
 .../io/sstable/SSTableSimpleWriter.java         |   91 +-
 .../io/sstable/format/SSTableFormat.java        |   13 +-
 .../io/sstable/format/SSTableReader.java        |  188 +-
 .../io/sstable/format/SSTableWriter.java        |   84 +-
 .../cassandra/io/sstable/format/Version.java    |    5 +
 .../io/sstable/format/big/BigFormat.java        |   60 +-
 .../io/sstable/format/big/BigTableReader.java   |   55 +-
 .../io/sstable/format/big/BigTableScanner.java  |  191 +-
 .../io/sstable/format/big/BigTableWriter.java   |  218 +-
 .../sstable/format/big/IndexedSliceReader.java  |  542 ----
 .../format/big/SSTableNamesIterator.java        |  264 --
 .../format/big/SSTableSliceIterator.java        |  102 -
 .../sstable/format/big/SimpleSliceReader.java   |  108 -
 .../metadata/LegacyMetadataSerializer.java      |   20 +-
 .../io/sstable/metadata/MetadataCollector.java  |  284 +-
 .../io/sstable/metadata/MetadataSerializer.java |    2 +-
 .../io/sstable/metadata/MetadataType.java       |    6 +-
 .../io/sstable/metadata/StatsMetadata.java      |  124 +-
 .../io/util/DataIntegrityMetadata.java          |   11 +-
 .../org/apache/cassandra/io/util/FileUtils.java |   29 +
 .../apache/cassandra/net/MessagingService.java  |   15 +-
 .../org/apache/cassandra/repair/RepairJob.java  |    6 +-
 .../org/apache/cassandra/repair/Validator.java  |   32 +-
 .../cassandra/schema/LegacySchemaTables.java    |  926 +++----
 .../cassandra/serializers/ListSerializer.java   |    4 +-
 .../cassandra/serializers/MapSerializer.java    |   10 +-
 .../cassandra/serializers/SetSerializer.java    |    6 +-
 .../cassandra/service/AbstractReadExecutor.java |   58 +-
 .../cassandra/service/AbstractRowResolver.java  |   56 -
 .../cassandra/service/AsyncRepairCallback.java  |    4 +-
 .../apache/cassandra/service/CASRequest.java    |   13 +-
 .../apache/cassandra/service/CacheService.java  |   74 +-
 .../apache/cassandra/service/DataResolver.java  |  428 +++
 .../cassandra/service/DigestResolver.java       |   98 +
 .../apache/cassandra/service/IReadCommand.java  |   24 -
 .../cassandra/service/IResponseResolver.java    |   43 -
 .../service/RangeSliceResponseResolver.java     |  168 --
 .../service/RangeSliceVerbHandler.java          |   40 -
 .../apache/cassandra/service/ReadCallback.java  |  100 +-
 .../cassandra/service/ResponseResolver.java     |   61 +
 .../cassandra/service/RowDataResolver.java      |  177 --
 .../cassandra/service/RowDigestResolver.java    |  107 -
 .../apache/cassandra/service/StorageProxy.java  |  978 ++++---
 .../cassandra/service/StorageService.java       |   25 +-
 .../service/pager/AbstractQueryPager.java       |  398 +--
 .../service/pager/MultiPartitionPager.java      |  146 +-
 .../service/pager/NamesQueryPager.java          |  108 -
 .../cassandra/service/pager/Pageable.java       |   41 -
 .../cassandra/service/pager/PagingState.java    |   20 +-
 .../cassandra/service/pager/QueryPager.java     |   66 +-
 .../cassandra/service/pager/QueryPagers.java    |  175 +-
 .../service/pager/RangeNamesQueryPager.java     |   57 +-
 .../service/pager/RangeSliceQueryPager.java     |  119 +-
 .../service/pager/SinglePartitionPager.java     |   60 +-
 .../service/pager/SliceQueryPager.java          |  118 -
 .../apache/cassandra/service/paxos/Commit.java  |  108 +-
 .../cassandra/service/paxos/PaxosState.java     |   12 +-
 .../service/paxos/PrepareCallback.java          |    3 +-
 .../service/paxos/PrepareResponse.java          |   73 +-
 .../cassandra/streaming/StreamReader.java       |  170 +-
 .../cassandra/streaming/StreamSession.java      |    8 +-
 .../compress/CompressedStreamReader.java        |    4 +-
 .../streaming/messages/FileMessageHeader.java   |   32 +-
 .../streaming/messages/OutgoingFileMessage.java |    5 +-
 .../streaming/messages/StreamMessage.java       |    3 +-
 .../cassandra/thrift/CassandraServer.java       | 1160 +++++---
 .../cassandra/thrift/ThriftConversion.java      |  181 +-
 .../cassandra/thrift/ThriftResultsMerger.java   |  317 +++
 .../cassandra/thrift/ThriftValidation.java      |  227 +-
 .../apache/cassandra/tools/SSTableExport.java   |  480 ----
 .../apache/cassandra/tools/SSTableImport.java   |  568 ----
 .../apache/cassandra/tracing/TraceKeyspace.java |   47 +-
 .../transport/messages/QueryMessage.java        |    2 +-
 .../org/apache/cassandra/triggers/ITrigger.java |    7 +-
 .../cassandra/triggers/TriggerExecutor.java     |  100 +-
 .../apache/cassandra/utils/ByteBufferUtil.java  |   16 +-
 .../org/apache/cassandra/utils/FBUtilities.java |   40 +-
 .../apache/cassandra/utils/MergeIterator.java   |   32 +-
 .../utils/NativeSSTableLoaderClient.java        |   63 +-
 .../org/apache/cassandra/utils/Sorting.java     |  254 ++
 .../org/apache/cassandra/utils/btree/BTree.java |   86 +-
 .../utils/btree/BTreeSearchIterator.java        |   71 +-
 .../apache/cassandra/utils/btree/BTreeSet.java  |  383 ---
 .../apache/cassandra/utils/btree/Builder.java   |    8 +-
 .../org/apache/cassandra/utils/btree/Path.java  |   17 +-
 .../cassandra/utils/btree/UpdateFunction.java   |   39 +-
 .../cassandra/utils/concurrent/Accumulator.java |    5 +
 .../apache/cassandra/utils/memory/HeapPool.java |  102 +-
 .../utils/memory/MemtableAllocator.java         |   21 +-
 .../utils/memory/MemtableBufferAllocator.java   |   94 +-
 .../cassandra/utils/memory/NativeAllocator.java |   33 +-
 .../apache/cassandra/utils/LongBTreeTest.java   |  502 ----
 test/conf/cassandra.yaml                        |    2 +-
 test/conf/logback-test.xml                      |    2 +-
 .../Keyspace1-Standard3-jb-1-CompressionInfo.db |  Bin 43 -> 0 bytes
 .../Keyspace1-Standard3-jb-1-Data.db            |  Bin 133 -> 0 bytes
 .../Keyspace1-Standard3-jb-1-Filter.db          |  Bin 24 -> 0 bytes
 .../Keyspace1-Standard3-jb-1-Index.db           |  Bin 90 -> 0 bytes
 .../Keyspace1-Standard3-jb-1-Statistics.db      |  Bin 4390 -> 0 bytes
 .../Keyspace1-Standard3-jb-1-Summary.db         |  Bin 71 -> 0 bytes
 .../Keyspace1-Standard3-jb-1-TOC.txt            |    7 -
 test/data/corrupt-sstables/la-1-big-CRC.db      |  Bin 0 -> 8 bytes
 test/data/corrupt-sstables/la-1-big-Data.db     |  Bin 0 -> 280 bytes
 .../corrupt-sstables/la-1-big-Digest.adler32    |    1 +
 test/data/corrupt-sstables/la-1-big-Filter.db   |  Bin 0 -> 24 bytes
 test/data/corrupt-sstables/la-1-big-Index.db    |  Bin 0 -> 105 bytes
 .../corrupt-sstables/la-1-big-Statistics.db     |  Bin 0 -> 4649 bytes
 test/data/corrupt-sstables/la-1-big-Summary.db  |  Bin 0 -> 83 bytes
 test/data/corrupt-sstables/la-1-big-TOC.txt     |    8 +
 .../cql3/DropKeyspaceCommitLogRecycleTest.java  |   91 -
 .../cassandra/db/LongFlushMemtableTest.java     |   86 -
 .../apache/cassandra/db/LongKeyspaceTest.java   |   82 -
 .../cassandra/db/commitlog/ComitLogStress.java  |   97 -
 .../db/commitlog/CommitLogStressTest.java       |   41 +-
 .../db/compaction/LongCompactionsTest.java      |   41 +-
 .../LongLeveledCompactionStrategyTest.java      |    9 +-
 .../cassandra/AbstractReadCommandBuilder.java   |  327 +++
 .../org/apache/cassandra/EmbeddedServer.java    |   83 -
 test/unit/org/apache/cassandra/MockSchema.java  |   17 +-
 .../unit/org/apache/cassandra/SchemaLoader.java |  441 +--
 .../org/apache/cassandra/UpdateBuilder.java     |  119 +
 test/unit/org/apache/cassandra/Util.java        |  402 +--
 .../cassandra/cache/AutoSavingCacheTest.java    |   25 +-
 .../cassandra/cache/CacheProviderTest.java      |  115 +-
 .../apache/cassandra/config/CFMetaDataTest.java |  155 ++
 .../cassandra/config/ColumnDefinitionTest.java  |   13 +-
 .../config/LegacySchemaTablesTest.java          |    9 +-
 .../org/apache/cassandra/cql3/CQLTester.java    |  140 +-
 .../cassandra/cql3/ColumnConditionTest.java     |   97 +-
 .../org/apache/cassandra/cql3/DeleteTest.java   |    9 +-
 .../cassandra/cql3/IndexQueryPagingTest.java    |   88 +
 .../cassandra/cql3/NonNativeTimestampTest.java  |   50 +-
 .../apache/cassandra/cql3/SimpleQueryTest.java  |  532 ++++
 .../cassandra/cql3/ThriftCompatibilityTest.java |   17 +-
 .../PrimaryKeyRestrictionSetTest.java           |  645 +++--
 .../validation/entities/CollectionsTest.java    |    2 +-
 .../cql3/validation/entities/CountersTest.java  |    4 +-
 .../entities/FrozenCollectionsTest.java         |   10 +-
 .../validation/entities/SecondaryIndexTest.java |   53 +-
 .../cql3/validation/entities/UFAuthTest.java    |    2 +-
 .../entities/UFIdentificationTest.java          |    8 +-
 .../cql3/validation/entities/UFTest.java        |    3 +-
 .../miscellaneous/CrcCheckChanceTest.java       |    4 +-
 .../SSTableMetadataTrackingTest.java            |    1 +
 .../cql3/validation/operations/AlterTest.java   |    2 +
 .../cql3/validation/operations/CreateTest.java  |    8 +-
 .../validation/operations/SelectLimitTest.java  |   10 +-
 .../SelectSingleColumnRelationTest.java         |    2 +-
 .../cql3/validation/operations/SelectTest.java  |    4 +-
 .../db/ArrayBackedSortedColumnsTest.java        |  426 ---
 .../cassandra/db/BatchlogManagerTest.java       |   64 +-
 test/unit/org/apache/cassandra/db/CellTest.java |  124 +-
 .../org/apache/cassandra/db/CleanupTest.java    |   82 +-
 .../cassandra/db/CollationControllerTest.java   |  138 -
 .../cassandra/db/ColumnFamilyMetricTest.java    |   37 +-
 .../cassandra/db/ColumnFamilyStoreTest.java     | 2533 +++---------------
 .../apache/cassandra/db/ColumnFamilyTest.java   |  277 --
 .../org/apache/cassandra/db/CommitLogTest.java  |  297 +-
 .../apache/cassandra/db/CounterCacheTest.java   |   82 +-
 .../apache/cassandra/db/CounterCellTest.java    |  443 +--
 .../cassandra/db/CounterMutationTest.java       |  248 +-
 .../cassandra/db/DeletePartitionTest.java       |   97 +
 .../apache/cassandra/db/DirectoriesTest.java    |   35 +-
 .../apache/cassandra/db/HintedHandOffTest.java  |   48 +-
 .../org/apache/cassandra/db/KeyCacheTest.java   |   89 +-
 .../org/apache/cassandra/db/KeyspaceTest.java   |  843 +++---
 .../apache/cassandra/db/MultiKeyspaceTest.java  |   49 +
 .../org/apache/cassandra/db/MultitableTest.java |   80 -
 .../org/apache/cassandra/db/NameSortTest.java   |   76 +-
 .../org/apache/cassandra/db/NativeCellTest.java |  251 --
 .../cassandra/db/PartitionRangeReadTest.java    |  375 +++
 .../org/apache/cassandra/db/PartitionTest.java  |  180 ++
 .../cassandra/db/RangeTombstoneListTest.java    |  346 +--
 .../apache/cassandra/db/RangeTombstoneTest.java |  489 ++--
 .../apache/cassandra/db/ReadMessageTest.java    |  180 +-
 .../cassandra/db/RecoveryManager2Test.java      |   96 -
 .../cassandra/db/RecoveryManager3Test.java      |   99 -
 .../db/RecoveryManagerFlushedTest.java          |   97 +
 .../db/RecoveryManagerMissingHeaderTest.java    |   94 +
 .../cassandra/db/RecoveryManagerTest.java       |  125 +-
 .../db/RecoveryManagerTruncateTest.java         |  154 +-
 .../org/apache/cassandra/db/RemoveCellTest.java |   83 +-
 .../cassandra/db/RemoveColumnFamilyTest.java    |   73 -
 .../db/RemoveColumnFamilyWithFlush1Test.java    |   75 -
 .../db/RemoveColumnFamilyWithFlush2Test.java    |   73 -
 .../apache/cassandra/db/RemoveSubCellTest.java  |  119 -
 .../apache/cassandra/db/RowCacheCQLTest.java    |   10 +-
 .../org/apache/cassandra/db/RowCacheTest.java   |  197 +-
 .../apache/cassandra/db/RowIndexEntryTest.java  |   71 +-
 .../apache/cassandra/db/RowIterationTest.java   |  112 +-
 test/unit/org/apache/cassandra/db/RowTest.java  |  211 +-
 .../unit/org/apache/cassandra/db/ScrubTest.java |  256 +-
 .../apache/cassandra/db/SecondaryIndexTest.java |  490 ++++
 .../apache/cassandra/db/SerializationsTest.java |  405 ---
 .../org/apache/cassandra/db/TimeSortTest.java   |  129 +-
 .../org/apache/cassandra/db/VerifyTest.java     |  143 +-
 .../db/commitlog/CommitLogTestReplayer.java     |    4 +-
 .../db/commitlog/CommitLogUpgradeTest.java      |   15 +-
 .../db/commitlog/CommitLogUpgradeTestMaker.java |    9 +-
 .../db/compaction/AntiCompactionTest.java       |  140 +-
 .../compaction/BlacklistingCompactionsTest.java |   35 +-
 .../compaction/CompactionAwareWriterTest.java   |  130 +-
 .../db/compaction/CompactionsPurgeTest.java     |  283 +-
 .../db/compaction/CompactionsTest.java          |  123 +-
 .../DateTieredCompactionStrategyTest.java       |   38 +-
 .../LeveledCompactionStrategyTest.java          |   52 +-
 .../db/compaction/OneCompactionTest.java        |   65 +-
 .../SizeTieredCompactionStrategyTest.java       |   29 +-
 .../cassandra/db/compaction/TTLExpiryTest.java  |  191 +-
 .../cassandra/db/composites/CTypeTest.java      |  161 +-
 .../cassandra/db/filter/ColumnSliceTest.java    |  495 ----
 .../apache/cassandra/db/filter/SliceTest.java   |  409 +++
 .../db/index/PerRowSecondaryIndexTest.java      |  184 +-
 .../apache/cassandra/db/lifecycle/ViewTest.java |    6 +-
 .../cassandra/db/marshal/CompositeTypeTest.java |   63 +-
 .../db/marshal/DynamicCompositeTypeTest.java    |   91 +-
 .../cassandra/db/marshal/TypeCompareTest.java   |   42 -
 .../cassandra/db/marshal/TypeParserTest.java    |   12 +-
 .../db/marshal/TypeValidationTest.java          |   26 -
 .../apache/cassandra/dht/BootStrapperTest.java  |   33 +-
 .../dht/ByteOrderedPartitionerTest.java         |   33 +-
 .../apache/cassandra/dht/KeyCollisionTest.java  |   57 +-
 .../cassandra/dht/Murmur3PartitionerTest.java   |   15 +-
 .../dht/OrderPreservingPartitionerTest.java     |   33 +-
 .../cassandra/dht/PartitionerTestCase.java      |   42 +-
 .../cassandra/dht/RandomPartitionerTest.java    |   18 +-
 .../org/apache/cassandra/dht/RangeTest.java     |   53 +-
 .../CompressedRandomAccessReaderTest.java       |   13 +-
 .../CompressedSequentialWriterTest.java         |   12 +-
 .../cassandra/io/compress/CompressorTest.java   |    2 +-
 .../io/sstable/BigTableWriterTest.java          |   24 +-
 .../io/sstable/CQLSSTableWriterClientTest.java  |    9 +-
 .../io/sstable/CQLSSTableWriterTest.java        |   27 +-
 .../cassandra/io/sstable/DescriptorTest.java    |    5 +-
 .../cassandra/io/sstable/IndexHelperTest.java   |   44 +-
 .../io/sstable/IndexSummaryManagerTest.java     |   80 +-
 .../cassandra/io/sstable/LegacySSTableTest.java |   92 +-
 .../cassandra/io/sstable/SSTableLoaderTest.java |   34 +-
 .../io/sstable/SSTableMetadataTest.java         |  182 +-
 .../cassandra/io/sstable/SSTableReaderTest.java |  214 +-
 .../io/sstable/SSTableRewriterTest.java         |  295 +-
 .../io/sstable/SSTableScannerTest.java          |  141 +-
 .../io/sstable/SSTableSimpleWriterTest.java     |  123 -
 .../cassandra/io/sstable/SSTableUtils.java      |   63 +-
 .../metadata/MetadataSerializerTest.java        |   32 +-
 .../cassandra/locator/CloudstackSnitchTest.java |    3 +-
 .../locator/DynamicEndpointSnitchTest.java      |   37 +-
 .../apache/cassandra/locator/EC2SnitchTest.java |   18 +-
 .../locator/GoogleCloudSnitchTest.java          |   18 +-
 .../GossipingPropertyFileSnitchTest.java        |    4 +-
 .../locator/NetworkTopologyStrategyTest.java    |   41 +-
 .../locator/OldNetworkTopologyStrategyTest.java |   49 +-
 .../ReplicationStrategyEndpointCacheTest.java   |   50 +-
 .../cassandra/locator/SimpleStrategyTest.java   |   55 +-
 .../cassandra/locator/TokenMetadataTest.java    |   42 +-
 .../cassandra/metrics/CQLMetricsTest.java       |   10 +-
 .../cassandra/metrics/LatencyMetricsTest.java   |    2 +
 .../cassandra/repair/LocalSyncTaskTest.java     |    1 +
 .../cassandra/repair/RepairSessionTest.java     |    1 +
 .../apache/cassandra/repair/ValidatorTest.java  |   41 +-
 .../repair/messages/RepairOptionTest.java       |    5 +-
 .../org/apache/cassandra/schema/DefsTest.java   |  346 ++-
 .../service/ActiveRepairServiceTest.java        |   12 +-
 .../service/BatchlogEndpointFilterTest.java     |    6 +-
 .../cassandra/service/DataResolverTest.java     |  535 ++++
 .../service/EmbeddedCassandraServiceTest.java   |   12 +-
 .../service/LeaveAndBootstrapTest.java          |   17 +-
 .../org/apache/cassandra/service/MoveTest.java  |   16 +-
 .../cassandra/service/PaxosStateTest.java       |   45 +-
 .../cassandra/service/QueryPagerTest.java       |  282 +-
 .../cassandra/service/RowResolverTest.java      |  160 --
 .../cassandra/service/SerializationsTest.java   |    1 +
 .../cassandra/service/StorageProxyTest.java     |   41 +-
 .../service/StorageServiceServerTest.java       |    9 +-
 .../service/pager/AbstractQueryPagerTest.java   |  187 --
 .../streaming/StreamTransferTaskTest.java       |    8 +-
 .../streaming/StreamingTransferTest.java        |  139 +-
 .../compress/CompressedInputStreamTest.java     |  124 -
 .../compression/CompressedInputStreamTest.java  |  122 +
 .../apache/cassandra/thrift/MultiSliceTest.java |  186 --
 .../cassandra/thrift/ThriftValidationTest.java  |  205 --
 .../cassandra/tools/SSTableExportTest.java      |  405 ---
 .../cassandra/tools/SSTableImportTest.java      |  278 --
 .../cassandra/transport/MessagePayloadTest.java |    2 -
 .../cassandra/triggers/TriggerExecutorTest.java |  285 +-
 .../cassandra/triggers/TriggersSchemaTest.java  |   36 +-
 .../apache/cassandra/triggers/TriggersTest.java |   73 +-
 .../org/apache/cassandra/utils/BTreeTest.java   |  110 +-
 .../org/apache/cassandra/utils/BitSetTest.java  |    6 +-
 .../apache/cassandra/utils/BloomFilterTest.java |   48 +-
 .../cassandra/utils/ByteBufferUtilTest.java     |   20 +-
 .../cassandra/utils/BytesReadTrackerTest.java   |    6 +-
 .../cassandra/utils/EncodedStreamsTest.java     |   75 +-
 .../cassandra/utils/EstimatedHistogramTest.java |    2 +-
 .../apache/cassandra/utils/FBUtilitiesTest.java |    5 +-
 .../org/apache/cassandra/utils/HexTest.java     |    5 +-
 .../cassandra/utils/HistogramBuilderTest.java   |    2 +-
 .../cassandra/utils/IntervalTreeTest.java       |  131 +-
 .../utils/JVMStabilityInspectorTest.java        |   11 +-
 .../apache/cassandra/utils/KeyGenerator.java    |   18 +-
 .../cassandra/utils/MergeIteratorTest.java      |   10 +-
 .../apache/cassandra/utils/MerkleTreeTest.java  |    7 +-
 .../cassandra/utils/SerializationsTest.java     |   11 +-
 .../cassandra/utils/StreamingHistogramTest.java |    8 +-
 .../apache/cassandra/utils/TopKSamplerTest.java |   13 +-
 .../org/apache/cassandra/utils/UUIDTests.java   |    8 +-
 .../utils/memory/NativeAllocatorTest.java       |    1 -
 tools/bin/json2sstable                          |   51 -
 tools/bin/json2sstable.bat                      |   48 -
 tools/bin/sstable2json                          |   52 -
 tools/bin/sstable2json.bat                      |   48 -
 662 files changed, 50125 insertions(+), 42971 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/a991b648/bin/sstablekeys
----------------------------------------------------------------------
diff --git a/bin/sstablekeys b/bin/sstablekeys
deleted file mode 100755
index 77d2e64..0000000
--- a/bin/sstablekeys
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/sh
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-if [ "x$CASSANDRA_INCLUDE" = "x" ]; then
-    for include in "`dirname "$0"`/cassandra.in.sh" \
-                   "$HOME/.cassandra.in.sh" \
-                   /usr/share/cassandra/cassandra.in.sh \
-                   /usr/local/share/cassandra/cassandra.in.sh \
-                   /opt/cassandra/cassandra.in.sh; do
-        if [ -r "$include" ]; then
-            . "$include"
-            break
-        fi
-    done
-elif [ -r "$CASSANDRA_INCLUDE" ]; then
-    . "$CASSANDRA_INCLUDE"
-fi
-
-
-# Use JAVA_HOME if set, otherwise look for java in PATH
-if [ -x "$JAVA_HOME/bin/java" ]; then
-    JAVA="$JAVA_HOME/bin/java"
-else
-    JAVA="`which java`"
-fi
-
-if [ -z "$CLASSPATH" ]; then
-    echo "You must set the CLASSPATH var" >&2
-    exit 1
-fi
-if [ $# -eq "0" ]; then
-    echo "Usage: `basename "$0"` <sstable>"
-    exit 2
-fi
-
-"$JAVA" $JAVA_AGENT -cp "$CLASSPATH" $JVM_OPTS -Dstorage-config="$CASSANDRA_CONF" \
-        -Dcassandra.storagedir="$cassandra_storagedir" \
-        -Dlogback.configurationFile=logback-tools.xml \
-        org.apache.cassandra.tools.SSTableExport "$@" -e
-
-# vi:ai sw=4 ts=4 tw=0 et

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a991b648/bin/sstablekeys.bat
----------------------------------------------------------------------
diff --git a/bin/sstablekeys.bat b/bin/sstablekeys.bat
deleted file mode 100644
index 0d0cf95..0000000
--- a/bin/sstablekeys.bat
+++ /dev/null
@@ -1,41 +0,0 @@
-@REM
-@REM  Licensed to the Apache Software Foundation (ASF) under one or more
-@REM  contributor license agreements.  See the NOTICE file distributed with
-@REM  this work for additional information regarding copyright ownership.
-@REM  The ASF licenses this file to You under the Apache License, Version 2.0
-@REM  (the "License"); you may not use this file except in compliance with
-@REM  the License.  You may obtain a copy of the License at
-@REM
-@REM      http://www.apache.org/licenses/LICENSE-2.0
-@REM
-@REM  Unless required by applicable law or agreed to in writing, software
-@REM  distributed under the License is distributed on an "AS IS" BASIS,
-@REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@REM  See the License for the specific language governing permissions and
-@REM  limitations under the License.
-
-@echo off
-if "%OS%" == "Windows_NT" setlocal
-
-pushd "%~dp0"
-call cassandra.in.bat
-
-if NOT DEFINED CASSANDRA_MAIN set CASSANDRA_MAIN=org.apache.cassandra.tools.SSTableExport
-if NOT DEFINED JAVA_HOME goto :err
-
-REM ***** JAVA options *****
-set JAVA_OPTS=^
- -Dlogback.configurationFile=logback-tools.xml
-
-set TOOLS_PARAMS=
-
-"%JAVA_HOME%\bin\java" %JAVA_OPTS% %CASSANDRA_PARAMS% -cp %CASSANDRA_CLASSPATH% "%CASSANDRA_MAIN%" %1 -e
-goto finally
-
-:err
-echo JAVA_HOME environment variable must be set!
-pause
-
-:finally
-
-ENDLOCAL

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a991b648/build.xml
----------------------------------------------------------------------
diff --git a/build.xml b/build.xml
index a2b3e74..7c05d7f 100644
--- a/build.xml
+++ b/build.xml
@@ -94,7 +94,7 @@
     <property name="maven-repository-url" value="https://repository.apache.org/content/repositories/snapshots"/>
     <property name="maven-repository-id" value="apache.snapshots.https"/>
 
-    <property name="test.timeout" value="60000" />
+    <property name="test.timeout" value="1200000" />
     <property name="test.long.timeout" value="600000" />
     <property name="test.burn.timeout" value="600000" />
 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a991b648/guide_8099.md
----------------------------------------------------------------------
diff --git a/guide_8099.md b/guide_8099.md
new file mode 100644
index 0000000..627b9dc
--- /dev/null
+++ b/guide_8099.md
@@ -0,0 +1,376 @@
+Overview of CASSANDRA-8099 changes
+==================================
+
+The goal of this document is to provide an overview of the main changes done in
+CASSANDRA-8099 so it's easier to dive into the patch. This assumes knowledge of
+the pre-existing code.
+
+CASSANDRA-8099 refactors the abstractions used by the storage engine and as
+such impact most of the code of said engine. The changes can be though of as
+following two main guidelines:
+1. the new abstractions are much more iterator-based (i.e. it tries harder to
+   avoid materializing everything in memory),
+2. and they are closer to the CQL representation of things (i.e. the storage
+   engine is aware of more structure, making it able to optimize accordingly).
+Note that while those changes have heavy impact on the actual code, the basic
+mechanisms of the read and write paths are largely unchanged.
+
+In the following, I'll start by describe the new abstractions introduced by the
+patch. I'll then provide a quick reference of existing class to what it becomes
+in the patch, after which I'll discuss how the refactor handles a number of
+more specific points. Lastly, the patch introduces some change to the on-wire
+and on-disk format so I'll discuss those quickly.
+
+
+Main new abstractions
+---------------------
+
+### Atom: Row and RangeTombstoneMarker
+
+Where the existing storage engine is mainly handling cells, the new engine
+groups cells into rows, and rows becomes the more central building block. A
+`Row` is identified by the value of it's clustering columns which are stored in
+a `Clustering` object (see below), and it associate a number of cells to each
+of its non-PK non-static columns (we'll discuss static columns more
+specifically later).
+
+The patch distinguishes 2 kind of columns: simple and complex ones. The
+_simple_ columns can have only 1 cell associated to them (or none), while the
+_complex_ ones will have an arbitrary number of cells associated.  Currently,
+the complex columns are only the non frozen collections (but we'll have
+non-frozen udt at some point and who knows what in the future).
+
+Like before, we also have to deal with range tombstones. However, instead of
+dealing with full range tombstones, we generally deal with
+`RangeTombstoneMarker` which is just one of the bound of the range tombstone
+(so that a range tombstone is composed of 2 "marker" in practice, its start and
+its end). I'll discuss the reasoning for this a bit more later. A
+`RangeTombstoneMarker` is identified by a `Slice.Bound` (which is to RT markers
+what the `Clustering` is to `Row`) and simply store its deletion information.
+
+The engine thus mainly work with rows and range tombstone markers, and they are
+both grouped under the common `Atom` interface. An "unfiltered" is thus just that:
+either a row or a range tombstone marker.
+
+> Side Note: the "Atom" naming is pretty bad. I've reused it mainly because it
+> plays a similar role to the existing OnDiskAtom, but it's arguably crappy now
+> because a row is definitively not "indivisible". Anyway, renaming suggestions
+> are more than welcome. The only alternative I've come up so far are "Block"
+> or "Element" but I'm not entirely convinced by either.
+
+### ClusteringPrefix, Clustering, Slice.Bound and ClusteringComparator
+
+Atoms are sorted (within a partition). They are ordered by their
+`ClusteringPrefix`, which is mainly a common interface for the `Clustering` of
+`Row`, and the `Slice.Bound` of `RangeTombstoneMarker`. More generally, a
+`ClusteringPrefix` is a prefix of the clustering values for the clustering
+columns of the table involved, with a `Clustering` being the special case where
+all values are provided. A `Slice.Bound` can be a true prefix however, having
+only some of the clustering values. Further, a `Slice.Bound` can be either a
+start or end bound, and it can be inclusive or exclusive. Sorting make sure that
+a start bound is before anything it "selects" (and conversely for the end). A
+`Slice` is then just 2 `Slice.Bound`: a start and a end, and selects anything
+that sorts between those.
+
+`ClusteringPrefix` are compared through the table `ClusteringComparator`, which
+is like our existing table comparator except that it only include comparators
+for the clustering column values. In particular, it includes neither the
+comparator for the column names themselves, nor the post-column-name comparator
+for collections (the latter being handled through the `CellPath`, see below).
+There is a also a `Clusterable` interface that `Atom` implements and that
+simply marks object that can be compared by a `ClusteringComparator`, i.e.
+objects that have a `ClusteringPrefix`.
+
+### Cell
+
+A cell holds the informations on a single value. It corresponds to a (CQL)
+column, has a value, a timestamp and optional ttl and local deletion time.
+Further, as said above, complex columns (collections) will have multiple
+associated cells. Those cells are distinguished by their `CellPath`, which are
+compared through a comparator that depends on the column type. The cells of
+simple columns just have a `null` cell path.
+
+### AtomIterator and PartitionIterator
+
+As often as possible, atoms are manipulated through iterators. And this through
+`AtomIterator`, which is an iterator over the atoms of a single partition, and
+`PartitionIterator`, which is an iterator of `AtomIterator`, i.e. an iterator
+over multiple partitions. In other words a single partition query fundamentally
+returns an `AtomIterator`, while a range query returns a `PartitionIterator`.
+Those iterators are closeable and the code has to be make sure to always close
+them as they will often have resources to clean (like an OpOrder.Group to close
+or files to release).
+
+The read path mainly consists in getting unfiltered and partition iterators from
+sstables and memtable and merging, filtering and transforming them. There is a
+number of functions to do just that (merging, filtering and transforming) in
+`AtomIterators` and `PartitionIterators`, but there is also a number of classes
+(`RowFilteringAtomIterator`, `CountingAtomIterator`, ...) that wraps one of
+those iterator type to apply some filtering/transformation.
+
+`AtomIterator` and `PartitionIterator` also have their doppelgänger
+`RowIterator` and `DataIterator` which exists for the sake of making it easier
+for the upper layers (StorageProxy and above) to deal with deletion. We'll
+discuss those later.
+
+### Partition: PartitionUpdate, AtomicBTreePartition and CachedPartition
+
+While we avoid materializing partitions in memory as much as possible (favoring
+the iterative approach), there is cases where we need/want to hold some subpart
+of a partition in memory and we have a generic `Partition` interface for those.
+A `Partition` basically corresponds to materializing an `AtomIterator` and
+is thus somewhat equivalent to the existing
+`ColumnFamily` (but again, many existing usage of `ColumnFamily` simply use
+`AtomIterator`). `Partition` is mainly used through the following
+implementations:
+* `PartitionUpdate`: this is what a `Mutation` holds and is used to gather
+  update and apply them to memtables.
+* `AtomicBTreePartition`: this is the direct counterpart of AtomicBTreeColumns.
+  The difference being that the BTree holds rows instead of cells. On updates, we
+  merge the rows together to create a new one.
+* `CachedPartition`: this is used by the row cache.
+
+### Read commands
+
+The `ReadCommand` class still exists, but instead of being just for single
+partition reads, it's now a common abstract class for both single partition and
+range reads. It then has 2 subclass: `SinglePartitionReadCommand` and
+`PartitionRangeReadCommand`, the former of which has 2 subclasses itself:
+`SinglePartitionSliceCommand` and `SinglePartitionNamesCommand`. All `ReadCommand`,
+have a `ColumnFilter` and a `DataLimits` (see below). `PartitionRangeReadCommand`
+additionally has a `DataRange`, which is mostly just a range of partition key
+with a `PartitionFilter`, while `SinglePartitionReadCommand` has a partition
+key and a `PartitionFilter` (see below too).
+
+The code to execute those queries locally, which used to be in `ColumnFamilyStore`
+and `CollationController` is now in those `ReadCommand` classes. For instance, the
+`CollationController` code for names queries is in `SinglePartitionNamesCommand`,
+and the code to decide if we use a 2ndary index or not is directly in
+`ReadCommand.executeLocally()`.
+
+Note that because they share a common class, all `ReadCommand` actually
+return a `PartitionIterator` (an iterator over partitions), even single partition
+ones (that iterator will just return one or zero result). It actually allows to
+generalize (and simplify) the "response resolver". Instead of having separate resolver
+for range and single partition queries, we only have `DataResolver` and
+`DigestResolver` that work for any read command. This does mean that the patch
+fixes CASSANDRA-2986, and that we could use digest queries for range if we
+wanted to (not necessarily saying it's a good idea).
+
+### ColumnFilter
+
+`ColumnFilter` is the new `List<IndexExpression>`. It holds those column restrictions that
+can't be directly fulfilled by the `PartitionFilter`, i.e. those that require either a
+2ndary index, or filtering.
+
+### PartitionFilter
+
+`PartitionFilter` is the new `IDiskAtomFilter`/`QueryFilter`. There is still 2 variants:
+`SlicePartitionFilter` and `NamesPartitionFilter`. Both variant includes the actual columns
+that are queried (as we don't return full CQL rows anymore), and both can be
+reversed. A names filter queries a bunch of rows by names, i.e. has a set of
+`Clustering`. A slice filter queries one or more slice of rows. A slice filter
+does not however include a limit since that is dealt with by `DataLimits` which
+is in `ReadCommand` directly.
+
+
+### DataLimits
+
+`DataLimits` implement the limits on a query. This is meant to abstract the differences between
+how we count for thrift and for CQL. Further, for CQL, this allow to have a limit per partition,
+which clean up how DISTINCT queries are handled and allow for CASSANDRA-7017 (the patch doesn't
+add support for the PER PARTITION LIMIT syntax of that ticket, but handle it
+internally otherwise).
+
+### SliceableAtomIterator
+
+The code also use the `SliceableAtomIterator` abstraction. A
+`SliceableAtomIterator` is an `AtomIterator` for which we basically know how to seek
+into efficiently. In particular, we have a `SSTableIterator` which is a
+`SliceableAtomIterator`. That `SSTableIterator` replaces both the existing
+`SSTableNamesIterator` and `SSTableSliceIterator`, and the respective
+`PartitionFilter` uses that `SliceableAtomIterator` interface to query what
+they want exactly.
+
+
+What did that become again?
+---------------------------
+
+For quick reference, here's the rough correspondence of old classes to new classes:
+* `ColumnFamily`: for writes, this is handled by `PartitionUpdate` and
+ `AtomicBTreePartition`. For reads, this is replaced by `AtomIterator` (or
+ `RowIterator`, see the parts on tombstones below). For the row cache, there is
+ a specific `CachedPartition` (which is actually an interface, the implementing
+ class being `ArrayBackedPartition`)
+* `Cell`: there is still a `Cell` class, which is roughly the same thing than
+  the old one, except that instead of having a cell name, cells are now in a
+  row and correspond to a column.
+* `QueryFilter`: doesn't really exists anymore. What it was holding is now in
+  `SinglePartitionReadCommand`.
+* `AbstractRangeCommand` is now `PartitionRangeReadCommand`.
+* `IDiskAtomFilter` is now `PartitionFilter`.
+* `List<IndexExpression>` is now `ColumnFilter`.
+* `RowDataResolver`, `RowDigestResolver` and `RangeSliceResponseResolver` are
+  now `DataResolver` and `DigestResolver`.
+* `Row` is now `AtomIterator`.
+* `List<Row>` is now `PartitionIterator` (or `DataIterator`, see the part about
+  tombstones below).
+* `AbstractCompactedRow` and`LazilyCompactedRow` are not really needed anymore.
+  Their corresponding code is in `CompactionIterable`.
+
+
+Noteworthy points
+-----------------
+
+### Dealing with tombstones and shadowed cells
+
+There is a few aspects worth noting regarding the handling of deleted and
+shadowed data:
+1. it's part of the contract of an `AtomIterator` that it must not shadow it's
+   own data. In other words, it should not return a cell that is deleted by one
+   of its own range tombstone, or by its partition level deletion. In practice
+   this means that we get rid of shadowed data quickly (a good thing) and that
+   there is a limited amount of places that have to deal with shadowing
+   (merging being one).
+2. Upper layer of the code (anything above StorageProxy) don't care about
+   deleted data (and deletion informations in general). Basically, as soon as
+   we've merge results for the replica, we don't need tombstones anymore.
+   So, instead of requiring all those upper layer to filter tombstones
+   themselves (which is error prone), we get rid of them as soon as we can,
+   i.e. as soon as we've resolved replica responses (so in the
+   `ResponseResolver`). To do that and to make it clear when tombstones have
+   been filtered (and make the code cleaner), we transform an `AtomIterator`
+   into a `RowIterator`. Both being essentially the same thing, except that a
+   `RowIterator` only return live stuffs. Which mean in particular that it's an
+   iterator of `Row` (since an unfiltered is either a row or a range tombstone and
+   we've filtered tombstones). Similarly, a `PartitionIterator` becomes a
+   `DataIterator`, which is just an iterator of `RowIterator`.
+3. In the existing code a CQL row deletion involves a range tombstone. But as
+   row deletions are pretty frequent and range tombstone have inherent
+   inefficiencies, the patch adds the notion of row deletion, which is just
+   some optional deletion information on the `Row`. This can be though as just
+   an optimization of range tombstones that span only a single row.
+4. As mentioned at the beginning of this document, the code splits range
+   tombstones into 2 range tombstone marker, one for each bound. The problem
+   with storing full range tombstone as we currently do is that it makes it
+   harder to merge them efficiently, and in particular to "normalize"
+   overlapping ones. In practice, a given `AtomIterator` guarantees that there
+   is only one range tombstone to worry about at any given time. In other
+   words, at any point of the iterator, either there is a single open range
+   tombstone or there is none, which makes things easier and more efficient.
+   It's worth noting that we still have the `RangeTombstone` class because for
+   in-memory structures (`PartitionUpdate`, `AtomicBTreePartition`, ...) we
+   currently use the existing `RangeTombstoneList` out of convenience. This is
+   kind of an implementation detail that could change in the future.
+
+### statics
+
+Static columns are handled separately from the rest of the rows. In practice,
+each `Partition`/`AtomIterator` has a separate "static row" that holds the
+value for all the static columns (that row can of course be empty). That row
+doesn't really correspond to any CQL row, it's content is simply "merged" to
+the result set in `SelectStatement` (very much like we already do).
+
+### Row liveness
+
+In CQL, a row can exists even if only its PK columns have values. In other
+words, a `Row` can be live even if it doesn't have any cells. Currently, we
+handle this through the "row marker" (i.e. through a specific cell). The patch
+makes this slightly less hacky by adding a timestamp (and potentially a ttl) to
+each row, which can be though as the timestamp (and ttl) of the PK columns.
+
+Further, when we query only some specific columns in a row, we need to add a
+row (with nulls) in the result set if a row is live (it has live cells or the
+timestamp we described above) even if it has no actual values for the queried
+columns.  We currently deal with that by querying entire row all the time, but
+the patch change that. This does mean that even when we query only some
+columns, we still need to have the information on whether the row itself is
+live or not. And because we'll merge results from different sources (which can
+include deletions), a boolean is not enough, so we include in a `Row` object
+the maximum live timestamp known for this row. Which currently mean that in
+practice, we do scan the full row on disk but filter cells we're not interested
+by right away (and in fact, we don't even deserialize the value of such cells).
+This might be optimizable later on, but expiring data makes that harder (we
+typically can't just pre-compute that max live timestamp when writing the
+sstable since it can depend on the time of the query).
+
+### Flyweight pattern
+
+The patch makes relatively heavy use of a "flyweight"-like pattern. Typically,
+`Row` and `Cell` data are stored in arrays, and a given `AtomIterator` will
+only use a single `Row` object (and `Cell` object) that points in those arrays
+(and thus change at each call to `hasNext()/next()`). This does mean that the
+objects returned that way shouldn't be aliased (taken a reference of) without
+care. The patch uses an `Aliasable` interface to mark object that may use this
+pattern and should thus potentially be copied in the rare cases where a
+reference should be kept on them.
+
+### Reversed queries
+
+The patch slightly change the way reversed queries are handled. First, while
+a reverse query should currently reverse its slices in `SliceQueryFilter`, this
+is not the case anymore: `SlicePartitionFilter` always keep its slices in
+clustering order and simply handles those from the end to the beginning on
+reversed queries. Further, if a query is reversed, the results are returned in
+this reverse order all the way through. Which differs from the current code
+where `ColumnFamily` actually always holds cells in forward order (making it a
+mess for paging and forcing us to re-reverse everything in the result set).
+
+### Compaction
+
+As the storage engine works iteratively, compaction simply has to get iterators
+on the sstables, merge them and write the result back, along with a simple
+filter that skip purgeable tombstones in the process. So there isn't really a
+need for `AbstractCompactedRow`/`LazilyCompactedRow` anymore and the
+compaction/purging code is now in `CompactionIterable` directly.
+
+### Short reads
+
+The current way to handle short reads would require us to consume the whole
+result before deciding on a retry (and we currently retry the whole command),
+which doesn't work too well in an iterative world.  So the patch moves read
+protection in `DataResolver` (where it kind of belong anyway) and we don't
+retry the full command anymore. Instead, if we realize that a given node has a
+short read while its result is consumed, we simply query this node (and this
+node only) for a continuation of the result. On top of avoiding the retry of
+the whole read (and limiting the number of node queried on the retry), this
+also make it trivial to solve CASSANDRA-8933.
+
+
+Storage format (on-disk and on-wire)
+------------------------------------
+
+Given that the main abstractions are changed, the existing on-wire
+`ColumnFamily` format is not appropriate anymore and the patch switches to a
+new format. The same can be told of the on-disk format, and while it is not an
+objective of CASSANDRA-8099 to get fancy on the on-disk format, using the
+on-wire format as on-disk format was actually relatively simple (until more
+substantial changes land with CASSANDRA-7447) and the patch does that too.
+
+For a given partition, the format simply serialize rows one after another
+(atoms in practice). For the on-disk format, this means that it is now rows
+that are indexed, not cells. The format uses a header that is written at the
+beginning of each partition for the on-wire format (in
+`AtomIteratorSerializer`) and is kept as a new sstable `Component` for
+sstables. The details of the format are described in the javadoc of
+`AtomIteratorSerializer` (only used by the on-wire format) and of
+`AtomSerializer`, so let me just point the following differences compared to
+the current format:
+* Clustering values are only serialized once per row (we even skip serializing the
+  number of elements since that is fixed for a given table).
+* Column names are not written for every row. Instead they are written once in
+  the header. For a given row, we support two small variant: dense and sparse.
+  When dense, cells come in the order the columns have in the header, meaning
+  that if a row doesn't have a particular column, this column will still use
+  a byte. When sparse, we don't have anything if the column doesn't have a cell,
+  but each cell has an additional 2 bytes which points into the header (so with
+  vint it should rarely take more than 1 byte in practice). The variant used
+  is automatically decided based on stats on how many columns set a row has on
+  average for the source we serialize.
+* Values for fixed-width cell values are serialized without a size.
+* If a cell has the same timestamp than its row, that timestamp is not repeated
+  for the cell. Same for the ttl (if applicable).
+* Timestamps, ttls and local deletion times are delta encoded so that they are
+  ripe for vint encoding. The current version of the patch does not yet
+  activate vint encoding however (neither for on-wire or on-disk).
+

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a991b648/src/java/org/apache/cassandra/cache/AutoSavingCache.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cache/AutoSavingCache.java b/src/java/org/apache/cassandra/cache/AutoSavingCache.java
index a204a18..9dda019 100644
--- a/src/java/org/apache/cassandra/cache/AutoSavingCache.java
+++ b/src/java/org/apache/cassandra/cache/AutoSavingCache.java
@@ -207,7 +207,7 @@ public class AutoSavingCache<K extends CacheKey, V> extends InstrumentingCache<K
             else
                 type = OperationType.UNKNOWN;
 
-            info = new CompactionInfo(CFMetaData.denseCFMetaData(SystemKeyspace.NAME, cacheType.toString(), BytesType.instance),
+            info = new CompactionInfo(CFMetaData.createFake(SystemKeyspace.NAME, cacheType.toString()),
                                       type,
                                       0,
                                       keysEstimate,

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a991b648/src/java/org/apache/cassandra/cache/CounterCacheKey.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cache/CounterCacheKey.java b/src/java/org/apache/cassandra/cache/CounterCacheKey.java
index 60247c5..00766ee 100644
--- a/src/java/org/apache/cassandra/cache/CounterCacheKey.java
+++ b/src/java/org/apache/cassandra/cache/CounterCacheKey.java
@@ -21,29 +21,44 @@ import java.nio.ByteBuffer;
 import java.util.Arrays;
 import java.util.UUID;
 
-import org.apache.cassandra.db.composites.CellName;
-import org.apache.cassandra.db.composites.CellNames;
+import org.apache.cassandra.config.ColumnDefinition;
+import org.apache.cassandra.db.*;
+import org.apache.cassandra.db.rows.CellPath;
+import org.apache.cassandra.db.marshal.CompositeType;
 import org.apache.cassandra.utils.*;
 
 public class CounterCacheKey implements CacheKey
 {
-    private static final long EMPTY_SIZE = ObjectSizes.measure(new CounterCacheKey(null, ByteBufferUtil.EMPTY_BYTE_BUFFER, CellNames.simpleDense(ByteBuffer.allocate(1))))
+    private static final long EMPTY_SIZE = ObjectSizes.measure(new CounterCacheKey(null, ByteBufferUtil.EMPTY_BYTE_BUFFER, ByteBuffer.allocate(1)))
                                            + ObjectSizes.measure(new UUID(0, 0));
 
     public final UUID cfId;
     public final byte[] partitionKey;
     public final byte[] cellName;
 
-    private CounterCacheKey(UUID cfId, ByteBuffer partitionKey, CellName cellName)
+    public CounterCacheKey(UUID cfId, ByteBuffer partitionKey, ByteBuffer cellName)
     {
         this.cfId = cfId;
         this.partitionKey = ByteBufferUtil.getArray(partitionKey);
-        this.cellName = ByteBufferUtil.getArray(cellName.toByteBuffer());
+        this.cellName = ByteBufferUtil.getArray(cellName);
     }
 
-    public static CounterCacheKey create(UUID cfId, ByteBuffer partitionKey, CellName cellName)
+    public static CounterCacheKey create(UUID cfId, ByteBuffer partitionKey, Clustering clustering, ColumnDefinition c, CellPath path)
     {
-        return new CounterCacheKey(cfId, partitionKey, cellName);
+        return new CounterCacheKey(cfId, partitionKey, makeCellName(clustering, c, path));
+    }
+
+    private static ByteBuffer makeCellName(Clustering clustering, ColumnDefinition c, CellPath path)
+    {
+        int cs = clustering.size();
+        ByteBuffer[] values = new ByteBuffer[cs + 1 + (path == null ? 0 : path.size())];
+        for (int i = 0; i < cs; i++)
+            values[i] = clustering.get(i);
+        values[cs] = c.name.bytes;
+        if (path != null)
+            for (int i = 0; i < path.size(); i++)
+                values[cs + 1 + i] = path.get(i);
+        return CompositeType.build(values);
     }
 
     public UUID getCFId()

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a991b648/src/java/org/apache/cassandra/cache/OHCProvider.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cache/OHCProvider.java b/src/java/org/apache/cassandra/cache/OHCProvider.java
index e4cfb69..981a1f8 100644
--- a/src/java/org/apache/cassandra/cache/OHCProvider.java
+++ b/src/java/org/apache/cassandra/cache/OHCProvider.java
@@ -28,8 +28,8 @@ import java.util.UUID;
 import com.google.common.base.Function;
 
 import org.apache.cassandra.config.DatabaseDescriptor;
-import org.apache.cassandra.db.ColumnFamily;
 import org.apache.cassandra.db.TypeSizes;
+import org.apache.cassandra.db.partitions.CachedPartition;
 import org.apache.cassandra.io.util.DataOutputPlus;
 import org.apache.cassandra.io.util.Memory;
 import org.apache.cassandra.net.MessagingService;
@@ -159,7 +159,7 @@ public class OHCProvider implements CacheProvider<RowCacheKey, IRowCacheEntry>
             if (isSentinel)
                 out.writeLong(((RowCacheSentinel) entry).sentinelId);
             else
-                ColumnFamily.serializer.serialize((ColumnFamily) entry, new DataOutputPlusAdapter(out), MessagingService.current_version);
+                CachedPartition.cacheSerializer.serialize((CachedPartition)entry, new DataOutputPlusAdapter(out));
         }
 
         public IRowCacheEntry deserialize(DataInput in) throws IOException
@@ -167,7 +167,7 @@ public class OHCProvider implements CacheProvider<RowCacheKey, IRowCacheEntry>
             boolean isSentinel = in.readBoolean();
             if (isSentinel)
                 return new RowCacheSentinel(in.readLong());
-            return ColumnFamily.serializer.deserialize(in, MessagingService.current_version);
+            return CachedPartition.cacheSerializer.deserialize(in);
         }
 
         public int serializedSize(IRowCacheEntry entry)
@@ -177,7 +177,7 @@ public class OHCProvider implements CacheProvider<RowCacheKey, IRowCacheEntry>
             if (entry instanceof RowCacheSentinel)
                 size += typeSizes.sizeof(((RowCacheSentinel) entry).sentinelId);
             else
-                size += ColumnFamily.serializer.serializedSize((ColumnFamily) entry, typeSizes, MessagingService.current_version);
+                size += CachedPartition.cacheSerializer.serializedSize((CachedPartition) entry, typeSizes);
             return size;
         }
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/a991b648/src/java/org/apache/cassandra/cache/SerializingCacheProvider.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cache/SerializingCacheProvider.java b/src/java/org/apache/cassandra/cache/SerializingCacheProvider.java
index f540322..70d9e73 100644
--- a/src/java/org/apache/cassandra/cache/SerializingCacheProvider.java
+++ b/src/java/org/apache/cassandra/cache/SerializingCacheProvider.java
@@ -21,8 +21,8 @@ import java.io.DataInput;
 import java.io.IOException;
 
 import org.apache.cassandra.config.DatabaseDescriptor;
-import org.apache.cassandra.db.ColumnFamily;
 import org.apache.cassandra.db.TypeSizes;
+import org.apache.cassandra.db.partitions.CachedPartition;
 import org.apache.cassandra.io.ISerializer;
 import org.apache.cassandra.io.util.DataOutputPlus;
 import org.apache.cassandra.net.MessagingService;
@@ -45,7 +45,7 @@ public class SerializingCacheProvider implements CacheProvider<RowCacheKey, IRow
             if (isSentinel)
                 out.writeLong(((RowCacheSentinel) entry).sentinelId);
             else
-                ColumnFamily.serializer.serialize((ColumnFamily) entry, out, MessagingService.current_version);
+                CachedPartition.cacheSerializer.serialize((CachedPartition)entry, out);
         }
 
         public IRowCacheEntry deserialize(DataInput in) throws IOException
@@ -53,7 +53,8 @@ public class SerializingCacheProvider implements CacheProvider<RowCacheKey, IRow
             boolean isSentinel = in.readBoolean();
             if (isSentinel)
                 return new RowCacheSentinel(in.readLong());
-            return ColumnFamily.serializer.deserialize(in, MessagingService.current_version);
+
+            return CachedPartition.cacheSerializer.deserialize(in);
         }
 
         public long serializedSize(IRowCacheEntry entry, TypeSizes typeSizes)
@@ -62,7 +63,7 @@ public class SerializingCacheProvider implements CacheProvider<RowCacheKey, IRow
             if (entry instanceof RowCacheSentinel)
                 size += typeSizes.sizeof(((RowCacheSentinel) entry).sentinelId);
             else
-                size += ColumnFamily.serializer.serializedSize((ColumnFamily) entry, typeSizes, MessagingService.current_version);
+                size += CachedPartition.cacheSerializer.serializedSize((CachedPartition) entry, typeSizes);
             return size;
         }
     }


Mime
View raw message