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

Expose all table metrics in virtual table

    XMLWordPrintableJSON

Details

    Description

      While we want a number of virtual tables to display data in a way thats great and intuitive like in nodetool. There is also much for being able to expose the metrics we have for tooling via CQL instead of JMX. This is more for the tooling and adhoc advanced users who know exactly what they are looking for.

      Schema:
      Initial idea is to expose data via ((keyspace, table), metric) with a column for each metric value. Could also use a Map or UDT instead of the column based that can be a bit more specific to each metric type. To that end there can be a metric_type column and then a UDT for each metric type filled in, or a single value with more of a Map<Text, Text> style. I am purposing the column type though as with ALLOW FILTERING it does allow more extensive query capabilities.

      Implementations:

      • Use reflection to grab all the metrics from TableMetrics (see: CASSANDRA-7622 impl). This is easiest and least abrasive towards new metric implementors... but its reflection and a kinda a bad idea.
      • Add a hook in TableMetrics to register with this virtual table when registering
      • Pull from the CassandraMetrics registery (either reporter or iterate through metrics query on read of virtual table)

      Attachments

        1. flight_recording_1270017199_13.jfr
          14.57 MB
          Maxim Muzafarov
        2. keyspayces_group responses times.png
          128 kB
          Maxim Muzafarov
        3. keyspayces_group summary.png
          115 kB
          Maxim Muzafarov
        4. select keyspaces_group by string prefix.png
          107 kB
          Maxim Muzafarov
        5. select keyspaces_group compare with wo.png
          106 kB
          Maxim Muzafarov
        6. select keyspaces_group without value.png
          68 kB
          Maxim Muzafarov
        7. systemv_views.metrics_dropped_message.png
          1.98 MB
          Maxim Muzafarov
        8. thread_pools benchmark.png
          173 kB
          Maxim Muzafarov

        Issue Links

          Activity

            People

              mmuzaf Maxim Muzafarov
              cnlwsu Chris Lohfink
              Maxim Muzafarov
              Chris Lohfink, Stefan Miklosovic
              Votes:
              0 Vote for this issue
              Watchers:
              11 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 - 8h
                  8h