From 12da6ccb9c0f346a0a53e2407d0aab07855ae2ed Mon Sep 17 00:00:00 2001 From: eruizgar91 Date: Mon, 6 Apr 2020 11:01:14 +0200 Subject: [PATCH 1/3] Add flat event record until the fix in the kafka connector --- README.md | 1 + pom.xml | 2 +- src/main/resources/avro/FlatEventRecord.avsc | 208 +++++++++++++++++++ 3 files changed, 210 insertions(+), 1 deletion(-) create mode 100644 src/main/resources/avro/FlatEventRecord.avsc diff --git a/README.md b/README.md index 5432410..c24feb7 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ The AVRO implementation of the schemas can be found in the **src/main/resources/ * BlockRecord.avsc * EventBlockRecord.avsc * EventRecord.avsc +* FlatEventRecord.avsc * LogRecord.avsc * LogRecordTopicsFlattened.avsc * NumberParameter.avsc diff --git a/pom.xml b/pom.xml index 920157e..d72321c 100755 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ io.keyko.monitoring schemas jar - 0.3.1 + 0.3.2 Web3 Monitoring Schemas https://github.com/keyko-io/web3-monitoring-schemas diff --git a/src/main/resources/avro/FlatEventRecord.avsc b/src/main/resources/avro/FlatEventRecord.avsc new file mode 100644 index 0000000..61ecb37 --- /dev/null +++ b/src/main/resources/avro/FlatEventRecord.avsc @@ -0,0 +1,208 @@ +{ + "namespace": "io.keyko.monitoring.schemas", + "type": "record", + "name": "EventRecord", + "fields": [ + { + "name": "id", + "type": "string" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "contractName", + "type": "string", + "default": "" + }, + { + "name": "filterId", + "type": "string" + }, + { + "name": "nodeName", + "type": "string" + }, + { + "name": "indexed_param_name_0", + "type": "string", + "default": "" + }, + { + "name": "indexed_param_type_0", + "type": "string", + "default": "" + }, + { + "name": "indexed_param_value_0", + "type": "string", + "default": "" + }, + { + "name": "indexed_param_name_1", + "type": "string", + "default": "" + }, + { + "name": "indexed_param_type_1", + "type": "string", + "default": "" + }, + { + "name": "indexed_param_value_1", + "type": "string", + "default": "" + }, + { + "name": "indexed_param_name_2", + "type": "string", + "default": "" + }, + { + "name": "indexed_param_type_2", + "type": "string", + "default": "" + }, + { + "name": "indexed_param_value_2", + "type": "string", + "default": "" + }, + { + "name": "indexed_param_name_3", + "type": "string", + "default": "" + }, + { + "name": "indexed_param_type_3", + "type": "string", + "default": "" + }, + { + "name": "indexed_param_value_3", + "type": "string", + "default": "" + }, + { + "name": "non_indexed_param_name_0", + "type": "string", + "default": "" + }, + { + "name": "non_indexed_param_type_0", + "type": "string", + "default": "" + }, + { + "name": "non_indexed_param_value_0", + "type": "string", + "default": "" + }, + { + "name": "non_indexed_param_name_1", + "type": "string", + "default": "" + }, + { + "name": "non_indexed_param_type_1", + "type": "string", + "default": "" + }, + { + "name": "non_indexed_param_value_1", + "type": "string", + "default": "" + }, + { + "name": "non_indexed_param_name_2", + "type": "string", + "default": "" + }, + { + "name": "non_indexed_param_type_2", + "type": "string", + "default": "" + }, + { + "name": "non_indexed_param_value_2", + "type": "string", + "default": "" + }, + { + "name": "non_indexed_param_name_3", + "type": "string", + "default": "" + }, + { + "name": "non_indexed_param_type_3", + "type": "string", + "default": "" + }, + { + "name": "non_indexed_param_value_3", + "type": "string", + "default": "" + }, + { + "name": "non_indexed_param_name_4", + "type": "string", + "default": "" + }, + { + "name": "non_indexed_param_type_4", + "type": "string", + "default": "" + }, + { + "name": "non_indexed_param_value_4", + "type": "string", + "default": "" + }, + { + "name": "transactionHash", + "type": "string" + }, + { + "name": "logIndex", + "type": "string", + "java-class": "java.math.BigInteger" + }, + { + "name": "blockNumber", + "type": "long" + }, + { + "name": "blockHash", + "type": "string" + }, + { + "name": "address", + "type": "string" + }, + { + "name": "status", + "type": { + "name": "ContractEventStatus", + "type": "enum", + "symbols": [ + "UNCONFIRMED", + "CONFIRMED", + "INVALIDATED" + ] + } + }, + { + "name": "eventSpecificationSignature", + "type": "string" + }, + { + "name": "networkName", + "type": "string" + }, + { + "name": "retries", + "type": "int" + } + ] +} \ No newline at end of file From 4c1e14c6eb5e510a821efe79afa859c6df56b55c Mon Sep 17 00:00:00 2001 From: eruizgar91 Date: Mon, 6 Apr 2020 11:10:17 +0200 Subject: [PATCH 2/3] Fix error with names2 --- src/main/resources/avro/FlatEventRecord.avsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/avro/FlatEventRecord.avsc b/src/main/resources/avro/FlatEventRecord.avsc index 61ecb37..3e78edd 100644 --- a/src/main/resources/avro/FlatEventRecord.avsc +++ b/src/main/resources/avro/FlatEventRecord.avsc @@ -1,7 +1,7 @@ { "namespace": "io.keyko.monitoring.schemas", "type": "record", - "name": "EventRecord", + "name": "FlatEventRecord", "fields": [ { "name": "id", @@ -183,7 +183,7 @@ { "name": "status", "type": { - "name": "ContractEventStatus", + "name": "FlatContractEventStatus", "type": "enum", "symbols": [ "UNCONFIRMED", From 89e655cfa02f9ab8bf51d43ac996bb2e4c24dfb1 Mon Sep 17 00:00:00 2001 From: eruizgar91 Date: Mon, 6 Apr 2020 11:29:08 +0200 Subject: [PATCH 3/3] Update pom --- pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d72321c..47b6a1f 100755 --- a/pom.xml +++ b/pom.xml @@ -101,7 +101,8 @@ ${project.basedir}/src/main/resources/avro/NumberParameter.avsc ${project.basedir}/src/main/resources/avro/StringParameter.avsc - ${project.basedir}/src/main/resources/avro/EventsRecord.avsc + ${project.basedir}/src/main/resources/avro/EventRecord.avsc + ${project.basedir}/src/main/resources/avro/FlatEventRecord.avsc ${project.basedir}/src/main/resources/avro/ViewRecord.avsc ${project.basedir}/src/main/resources/avro/BlockRecord.avsc ${project.basedir}/src/main/resources/avro/LogRecordRecord.avsc