tolbertam / sstable-tools

Tools for parsing, creating and doing other fun stuff with sstables
Apache License 2.0
162 stars 31 forks source link

Update to support 3.4 #44

Closed tolbertam closed 8 years ago

tolbertam commented 8 years ago

There were a couple of api changes in C* 3.4 which makes sstable-tools incompatible with it:

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /Users/atolbert/Documents/Projects/sstable-tools/src/main/java/com/csforge/sstable/reader/CassandraReader.java:[53,39] no suitable method found for iterator(org.apache.cassandra.db.DecoratedKey,org.apache.cassandra.db.filter.ColumnFilter,boolean,boolean)
    method org.apache.cassandra.io.sstable.format.SSTableReader.iterator(org.apache.cassandra.db.DecoratedKey,org.apache.cassandra.db.Slices,org.apache.cassandra.db.filter.ColumnFilter,boolean,boolean) is not applicable
      (actual and formal argument lists differ in length)
    method org.apache.cassandra.io.sstable.format.SSTableReader.iterator(org.apache.cassandra.io.util.FileDataInput,org.apache.cassandra.db.DecoratedKey,org.apache.cassandra.db.RowIndexEntry,org.apache.cassandra.db.Slices,org.apache.cassandra.db.filter.ColumnFilter,boolean,boolean) is not applicable
      (actual and formal argument lists differ in length)
[ERROR] /Users/atolbert/Documents/Projects/sstable-tools/src/main/java/com/csforge/sstable/reader/CassandraReader.java:[54,20] method map in interface java.util.stream.Stream<T> cannot be applied to given types;
  required: java.util.function.Function<? super java.lang.Object,? extends R>
  found: Partition::new
  reason: cannot infer type-variable(s) R
    (argument mismatch; invalid constructor reference
      incompatible types: java.lang.Object cannot be converted to org.apache.cassandra.db.rows.UnfilteredRowIterator)

Had fixed this locally, will push a fix for this later this week. The challenge will making this compatible with both versions or do we configure publishing 2 separate branches? There is probably some black magic where we can achieve this through reflection, although at some point we will probably reach a threshold in the future where we will need to provide per release versions.