From 4353ba8af9142b4766f821d1e614d79c37684624 Mon Sep 17 00:00:00 2001 From: eruizgar91 Date: Tue, 25 Feb 2020 12:13:27 +0100 Subject: [PATCH] Change with TimeSeriesParameter --- .../resources/avro/TimeSeriesParameter.avsc | 19 +++ src/main/resources/avro/TimeSeriesRecord.avsc | 143 +++--------------- 2 files changed, 39 insertions(+), 123 deletions(-) create mode 100644 src/main/resources/avro/TimeSeriesParameter.avsc diff --git a/src/main/resources/avro/TimeSeriesParameter.avsc b/src/main/resources/avro/TimeSeriesParameter.avsc new file mode 100644 index 0000000..598ff4f --- /dev/null +++ b/src/main/resources/avro/TimeSeriesParameter.avsc @@ -0,0 +1,19 @@ +{ + "namespace": "io.keyko.monitoring.schemas", + "type": "record", + "name": "TimeSeriesParameter", + "fields": [{ + "name": "value", + "type": ["null","string"] + }, + { + "name": "numberValue", + "type": "long", + "default": 0 + }, + { + "name": "label", + "type": ["null","string"] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/avro/TimeSeriesRecord.avsc b/src/main/resources/avro/TimeSeriesRecord.avsc index 14bfb4a..5c45b1d 100644 --- a/src/main/resources/avro/TimeSeriesRecord.avsc +++ b/src/main/resources/avro/TimeSeriesRecord.avsc @@ -21,147 +21,44 @@ "type": "string" }, { - "name": "output.input_0.numberValue", - "type": "long", - "default": 0 - }, - { - "name": "output.input_0.value", - "type": ["null","string"] - }, - { - "name": "output.input_0.label", - "type": ["null","string"] + "name": "param_0", + "type": ["null","TimeSeriesParameter"] }, { - "name": "output.input_1.numberValue", - "type": "long", - "default": 0 + "name": "param_1", + "type": ["null","TimeSeriesParameter"] }, { - "name": "output.input_1.value", - "type": ["null","string"] + "name": "param_2", + "type": ["null","TimeSeriesParameter"] }, { - "name": "output.input_1.label", - "type": ["null","string"] + "name": "param_3", + "type": ["null","TimeSeriesParameter"] }, { - "name": "output.input_2.numberValue", - "type": "long", - "default": 0 + "name": "param_4", + "type": ["null","TimeSeriesParameter"] }, { - "name": "output.input_2.value", - "type": ["null","string"] + "name": "param_5", + "type": ["null","TimeSeriesParameter"] }, { - "name": "output.input_2.label", - "type": ["null","string"] + "name": "param_6", + "type": ["null","TimeSeriesParameter"] }, { - "name": "output.input_3.numberValue", - "type": "long", - "default": 0 - }, - { - "name": "output.input_3.value", - "type": ["null","string"] - }, - { - "name": "output.input_3.label", - "type": ["null","string"] - }, - { - "name": "output.input_4.numberValue", - "type": "long", - "default": 0 - }, - { - "name": "output.input_4.value", - "type": ["null","string"] - }, - { - "name": "output.input_4.label", - "type": ["null","string"] - }, - { - "name": "output.input_5.numberValue", - "type": "long", - "default": 0 - }, - { - "name": "output.input_5.value", - "type": ["null","string"] - }, - { - "name": "output.input_5.label", - "type": ["null","string"] - }, - { - "name": "output.input_6.numberValue", - "type": "long", - "default": 0 - }, - { - "name": "output.input_6.value", - "type": ["null","string"] - }, - { - "name": "output.input_6.label", - "type": ["null","string"] - }, - { - "name": "output.input_7.numberValue", - "type": "long", - "default": 0 - }, - { - "name": "output.input_7.value", - "type": ["null","string"] - }, - { - "name": "output.input_7.label", - "type": ["null","string"] - }, - { - "name": "output.input_8.numberValue", - "type": "long", - "default": 0 - }, - { - "name": "output.input_8.value", - "type": ["null","string"] - }, - { - "name": "output.input_8.label", - "type": ["null","string"] - }, - { - "name": "output.input_9.numberValue", - "type": "long", - "default": 0 - }, - { - "name": "output.input_9.value", - "type": ["null","string"] - }, - { - "name": "output.input_9.label", - "type": ["null","string"] - }, - { - "name": "output.input_10.numberValue", - "type": "long", - "default": 0 + "name": "param_7", + "type": ["null","TimeSeriesParameter"] }, { - "name": "output.input_10.value", - "type": ["null","string"] + "name": "param_8", + "type": ["null","TimeSeriesParameter"] }, { - "name": "output.input_10.label", - "type": ["null","string"] + "name": "param_9", + "type": ["null","TimeSeriesParameter"] } ]