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

Sort output in nodetool status

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 5.1
    • Tool/nodetool
    • None

    Description

      Lets have this output:

      nodetool status
      Datacenter: dc1
      ===============
      Status=Up/Down
      |/ State=Normal/Leaving/Joining/Moving
      --  Address     Load        Tokens  Owns (effective)  Host ID                               Rack 
      UN  172.19.0.9  385.29 KiB  256     66.6%             6d194555-f6eb-41d0-c000-000000000003  rack3
      UN  172.19.0.5  609.07 KiB  256     68.4%             6d194555-f6eb-41d0-c000-000000000001  rack1
      UN  172.19.0.8  377.5 KiB   256     65.0%             6d194555-f6eb-41d0-c000-000000000002  rack2
      

      This is a very simple case but it will serve well for the explanation.

      What I would like to see is to have this output sorted. If I am looking for a particular node, e.g. by IP address, these entries are not sorted by IP in general, so when I have 20-nodes cluster and I want to check a particular node, it is like a needle in a haystack so I would welcome if they are ordered by IP.

      This can be generalized to other columns - sort by Load, for example, to see what nodes are the most loaded ones, sort by host id would be cool too. TCM introduced kind of predictable node ids so sorting them should give you the order in which nodes have been added etc.

      There might be a new switch added like "--sort=ip/id/load/rack". For loads, it would sort it from the most loaded one to least loaded one. For IPs and IDs, it would sort them from the "lowest" to the "highest" node in terms of IP address and ID. We might also group nodes by rack and by node id inside a rack.

      This should be done per DC.

      Attachments

        Activity

          People

            manish_m_pillai Manish M Pillai
            smiklosovic Stefan Miklosovic
            Manish M Pillai
            Bernardo Botella, Jordan West, Stefan Miklosovic
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 7h
                7h