Uploaded image for project: 'Subscription Watch'
  1. Subscription Watch
  2. SWATCH-4320

Migrate swatch-metrics-hbi MeasurementNormalizer to use CoreSocketNormalizer

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • subs-swatch-thunder

      Description

      As a swatch developer, I need to update MeasurementNormalizer in swatch-metrics-hbi to use the centralized CoreSocketNormalizer so that events sent to Kafka have values normalized consistently with swatch-tally.

      Technical Details

      File: swatch-metrics-hbi/src/main/java/.../hbi/events/normalization/MeasurementNormalizer.java

      Before:

      • Contains duplicated normalization logic
      • May produce different values than FactNormalizer in edge cases

      After:

      • Build NormalizationContext from HBI event data
      • Call CoreSocketNormalizer.normalize(context)
      • Use returned NormalizedMeasurements in SWatch event

      Data Flow

      HBI Event (Kafka)
          |
          v
      swatch-metrics-hbi
          |
          v
      FactNormalizer (classification only, NOT cores/sockets)
          |
          v
      MeasurementNormalizer
          |
          v
      CoreSocketNormalizer.normalize() <- swatch-common-instances
          |
          v
      SWatch Event (Kafka) with normalized cores/sockets
      

      Acceptance Criteria

      • MeasurementNormalizer builds NormalizationContext from event data
      • MeasurementNormalizer calls CoreSocketNormalizer.normalize()
      • Old normalization methods removed
      • All existing MeasurementNormalizer tests pass without modification
      • SWatch events contain same normalized values as before

              Unassigned Unassigned
              kflahert@redhat.com Kevin Flaherty
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: