instaclustr / cassandra-ttl-remover

Tool for rewriting SSTables to not contain TTLs
https://instaclustr.com
19 stars 8 forks source link

TTLRemover do not compile with Cassandra 2.2 #1

Closed farumi closed 4 years ago

farumi commented 6 years ago

Hello,

Very useful and instructive piece of software, thank you to share.

Anyway, I've followed the instructions on the Readme, but it didn't compile:

    [javac] /home/ferran/TTLRemover/cassandra-2.2-src/src/java/org/apache/cassandra/noTTL/NoTTLReader.java:1958: error: cannot find symbol
    [javac]         return sstableMetadata.replayPosition;
    [javac]                               ^
    [javac]   symbol:   variable replayPosition
    [javac]   location: variable sstableMetadata of type StatsMetadata

And compiler is right, this variable do not exist... on 2.2 (but it exists on 1.6)

To quickly solve the issue I've just deleted the code calling this (noTTL/NoTTLReader.java:1958):

    public ReplayPosition getReplayPosition()
    {
        return sstableMetadata.replayPosition;
    }

And it works!