Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-10660

Support user-defined compactions through nodetool

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Fix Version/s: 3.4
    • Component/s: Tools

      Description

      For a long time, we've supported running user-defined compactions through JMX. This comes in handy fairly often, mostly when dealing with low disk space or tombstone purging, so it would be good to add something to nodetool for this. An extra option for nodetool compact would probably suffice.

        Activity

        Hide
        kenfailbus Kenneth Failbus added a comment -

        This would be a good enhancement to the node tool to have option to compact and purging of tombstones.

        Show
        kenfailbus Kenneth Failbus added a comment - This would be a good enhancement to the node tool to have option to compact and purging of tombstones.
        Hide
        jeromatron Jeremy Hanna added a comment -

        Fwiw, would have been handy the other day in a case where someone updated gc grace and wanted to compact a handful of sstables.

        Show
        jeromatron Jeremy Hanna added a comment - Fwiw, would have been handy the other day in a case where someone updated gc grace and wanted to compact a handful of sstables.
        Hide
        jeromatron Jeremy Hanna added a comment -

        Kenneth Failbus in the meantime, here's a way to do it on the command-line: https://gist.github.com/jeromatron/e238e5795b3e79866b83

        Show
        jeromatron Jeremy Hanna added a comment - Kenneth Failbus in the meantime, here's a way to do it on the command-line: https://gist.github.com/jeromatron/e238e5795b3e79866b83
        Hide
        kenfailbus Kenneth Failbus added a comment -

        Jeremy Hanna Thanks I wrote also a script.

        Show
        kenfailbus Kenneth Failbus added a comment - Jeremy Hanna Thanks I wrote also a script.
        Hide
        jjirsa Jeff Jirsa added a comment -

        Added as --user-defined argument to nodetool compact, converting the list of arguments to a comma-joined string for forceUserDefinedCompaction

        2.1: https://github.com/jeffjirsa/cassandra/tree/cassandra-10660-2.1
        2.2: https://github.com/jeffjirsa/cassandra/tree/cassandra-10660-2.2
        2.2 applies cleanly to trunk, but just in case here's an explicit patch on that branch: https://github.com/jeffjirsa/cassandra/tree/cassandra-10660

        Show
        jjirsa Jeff Jirsa added a comment - Added as --user-defined argument to nodetool compact , converting the list of arguments to a comma-joined string for forceUserDefinedCompaction 2.1: https://github.com/jeffjirsa/cassandra/tree/cassandra-10660-2.1 2.2: https://github.com/jeffjirsa/cassandra/tree/cassandra-10660-2.2 2.2 applies cleanly to trunk, but just in case here's an explicit patch on that branch: https://github.com/jeffjirsa/cassandra/tree/cassandra-10660
        Hide
        yukim Yuki Morishita added a comment -

        Jeff, sorry for delay.

        Since this is the new feature at this time, I'd like to move target version to 3.x.
        Patch applies cleanly still, though I made small changes.

        • Added description for user defined compaction
        • We can use String.join from Java 8 instead of our own.
        branch testall dtest
        10660 testall dtest

        (tests are just kicked off)

        Show
        yukim Yuki Morishita added a comment - Jeff, sorry for delay. Since this is the new feature at this time, I'd like to move target version to 3.x. Patch applies cleanly still, though I made small changes. Added description for user defined compaction We can use String.join from Java 8 instead of our own. branch testall dtest 10660 testall dtest (tests are just kicked off)
        Hide
        jjirsa Jeff Jirsa added a comment -

        Ack, thanks for the cleanup. 3.x looks fine.

        Show
        jjirsa Jeff Jirsa added a comment - Ack, thanks for the cleanup. 3.x looks fine.
        Hide
        yukim Yuki Morishita added a comment -

        Committed as tests look good, thanks!

        Show
        yukim Yuki Morishita added a comment - Committed as tests look good, thanks!

          People

          • Assignee:
            jjirsa Jeff Jirsa
            Reporter:
            thobbs Tyler Hobbs
            Reviewer:
            Yuki Morishita
          • Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development