Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-27681

Refactor Table Latency Metrics

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.6.0, 3.0.0-alpha-4
    • None
    • None
    • Hide
      Table request metrics (table latency histograms and TableReadQueryMeter/TableWriteQueryMeter) have been reorganized into a new metric bean TableRequests. The new TableRequests bean is published separately for each table on the regionserver, with the bean name including the table name and metric names within the bean simplified. Beans will be cleaned up after tables leave the regionserver.

      Users who collect TableLatencies or table query meters will have to update metric collection to work with the new structure. For example:

      Old:
      {
            "name": "Hadoop:service=HBase,name=RegionServer,sub=TableLatencies",
            "modelerType": "RegionServer,sub=TableLatencies",
            "tag.Context": "regionserver",
            "tag.Hostname": "hostname",
            "Namespace_default_table_usertable_metric_deleteTime_num_ops": 0,
            "Namespace_default_table_usertable_metric_deleteTime_min": 0,
            "Namespace_default_table_usertable_metric_deleteTime_max": 0,
            "Namespace_default_table_usertable_metric_deleteTime_mean": 0,
            ...
      }

      New:
      {
            "name": "Hadoop:service=HBase,name=RegionServer,sub=TableRequests_Namespace_default_table_usertable",
            "modelerType": "RegionServer,sub=TableRequests_Namespace_default_table_usertable",
            "tag.Context": "regionserver",
            "tag.Hostname": "hostname",
            "DeleteTime_num_ops": 0,
            "DeleteTime_min": 0,
            "DeleteTime_max": 0,
            "DeleteTime_mean": 0,
            ...
      }
      Show
      Table request metrics (table latency histograms and TableReadQueryMeter/TableWriteQueryMeter) have been reorganized into a new metric bean TableRequests. The new TableRequests bean is published separately for each table on the regionserver, with the bean name including the table name and metric names within the bean simplified. Beans will be cleaned up after tables leave the regionserver. Users who collect TableLatencies or table query meters will have to update metric collection to work with the new structure. For example: Old: {       "name": "Hadoop:service=HBase,name=RegionServer,sub=TableLatencies",       "modelerType": "RegionServer,sub=TableLatencies",       "tag.Context": "regionserver",       "tag.Hostname": "hostname",       "Namespace_default_table_usertable_metric_deleteTime_num_ops": 0,       "Namespace_default_table_usertable_metric_deleteTime_min": 0,       "Namespace_default_table_usertable_metric_deleteTime_max": 0,       "Namespace_default_table_usertable_metric_deleteTime_mean": 0,       ... } New: {       "name": "Hadoop:service=HBase,name=RegionServer,sub=TableRequests_Namespace_default_table_usertable",       "modelerType": "RegionServer,sub=TableRequests_Namespace_default_table_usertable",       "tag.Context": "regionserver",       "tag.Hostname": "hostname",       "DeleteTime_num_ops": 0,       "DeleteTime_min": 0,       "DeleteTime_max": 0,       "DeleteTime_mean": 0,       ... }

    Description

      Benefit:

      1. Table Latency Metrics could removed after table has been moved away. Fix HBASE-27617
      2. Could remove the hash lookup caused by metrics map from the hot request path.
      3. Reduce the output in jmx. As if we use jmx_exporter to collect metrics to Prometheus, the operation overhead of performing regular matching in metric is relatively high(especially region metrics, which might be next step).
      4. I think that could be the first step after hbase-metrics released. It seems that the roadmap indicates that we should replace directly use hadoop-metrics2 with hbase-metrics.

      Influence:

      1. The metrics structure in jmx will change.

      Old:


      New:

      Attachments

        1. image-2023-03-01-23-56-16-819.png
          332 kB
          tianhang tang
        2. image-2023-03-01-23-55-14-095.png
          475 kB
          tianhang tang

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            tangtianhang tianhang tang
            tangtianhang tianhang tang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment