Uploaded image for project: 'Hawkular Metrics'
  1. Hawkular Metrics
  2. HWKMETRICS-436

AvailabilityType should be serialized as simple string in bucket data points

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 0.17.0
    • Fix Version/s: 0.19.0
    • Component/s: REST
    • Labels:
      None

      Description

      HWKMETRICS-420 refactored the AvailabilityBucketPoint class to include some new fields, one of which is durationMap which is a mapping of availability types to their respective durations. In its serialized JSON form it looks like,

      "durationMap": {
        "AvailabilityType{code=1, text=down}": 50,
        "AvailabilityType{code=0, text=up}": 100
      }
      

      We should be just using the string codes - up, down, unknown, admin. The above JSON would instead be

      "durationMap": {
        "down": 50,
        "up": 100
      }
      

      This would be consistent with what we expect for inserting availability data points, and it also keeps implementation details hidden. Jay Shaughnessy do you see any problems with this change?

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                nstefan Stefan Negrea
                Reporter:
                john.sanda John Sanda
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: