У меня есть следующая схема (.avs c файл)
{
"namespace": "com.avaya.mts",
"type": "record",
"name": "MultiTenancyOrgDataMessage",
"fields": [
{
"name": "eventType",
"type": [
"null",
{
"type": "enum",
"name": "TenantMessageType",
"symbols": [
"TENANT_ADDED",
"TENANT_UPDATED",
"TENANT_DELETED"
]
}
],
"doc": "Event type"
},
{
"name": "timestamp",
"type": "long",
"doc": "Timestamp of the operation"
},
{
"name": "tenantId",
"type": "string",
"doc": "Six digit unique tenant identifier"
},
{
"name": "data",
"type": [
"null",
{
"type": "record",
"name": "TenantData",
"fields": [
{
"name": "name",
"type": "string",
"doc": "Tenant name"
},
{
"name": "tenantId",
"type": "string",
"doc": "Six digit unique tenant identifier"
},
{
"name": "loginDomain",
"type": "string",
"doc": "Login domain name"
},
{
"name": "level",
"type": [
"null",
"string"
],
"doc": "OrganizationNode Level"
},
{
"name": "key",
"type": [
"null",
"string"
],
"doc": "String tenant identifier"
},
{
"name": "organizationNodeId",
"type": [
"null",
"string"
],
"doc": "Six digit unique orgnaization node identifier. Same as tenantId"
},
{
"name": "organizationHierarchy",
"type": [
"null",
"string"
],
"doc": "Full hierarchy path of the orgnaization node"
},
{
"name": "features",
"type": [
"null",
"string"
]
},
{
"name": "type",
"type": [
"null",
{
"type": "enum",
"name": "OrganizationNodeType",
"symbols": [
"TENANT",
"DEFAULT"
]
}
],
"doc": "Organization node type to differentiate between tenant and tenant hierarchy node"
},
{
"name": "orgLevels",
"type": [
"null",
{
"type": "array",
"items": {
"type": "record",
"name": "OrgLevel",
"fields": [
{
"name": "name",
"type": "string"
},
{
"name": "position",
"type": "int"
}
]
}
}
],
"doc": "Name of the organization node level"
},
{
"name": "solutionTemplates",
"type": [
"null",
{
"type": "record",
"name": "SolutionTemplate",
"fields": [
{
"name": "templateId",
"type": "string",
"doc": "Six digit unique solution template identifier"
},
{
"name": "name",
"type": "string",
"doc": "Solution template name"
},
{
"name": "description",
"type": [
"null",
"string"
],
"doc": "Solution template description"
}
]
}
],
"doc": "Solution template associated with the organization node"
},
{
"name": "profiles",
"type": [
"null",
{
"type": "array",
"items": {
"type": "record",
"name": "Profile",
"fields": [
{
"name": "profileId",
"type": "string",
"doc": "Six digit unique profile identifier"
},
{
"name": "name",
"type": "string",
"doc": "Profile name"
},
{
"name": "description",
"type": [
"null",
"string"
],
"doc": "Profile description"
}
]
}
}
],
"doc": "Array of the profiles associated with organization node"
},
{
"name": "tenantAttributes",
"type": [
"null",
{
"type": "array",
"items": {
"type": "record",
"name": "TenantAttribute",
"fields": [
{
"name": "name",
"type": "string",
"doc": "Tenant attribute name"
},
{
"name": "value",
"type": "string",
"doc": "Tenant attribute value"
}
]
}
}
],
"doc": "Array of tenant attributes"
},
{
"name": "children",
"type": [
"null",
{
"type": "array",
"items": {
"type": "record",
"name": "OrganizationNode",
"fields": [
{
"name": "name",
"type": [
"null",
"string"
],
"doc": "OrganizationNode name"
},
{
"name": "type",
"type": [
"null",
"OrganizationNodeType"
],
"doc": "OrganizationNode Type"
},
{
"name": "level",
"type": [
"null",
"string"
],
"doc": "OrganizationNode Level"
},
{
"name": "key",
"type": [
"null",
"string"
],
"doc": "Unique string identifier for the organization node"
},
{
"name": "organizationNodeId",
"type": [
"null",
"string"
],
"doc": "Six digit unique identifier for the ornagization node"
},
{
"name": "organizationHierarchy",
"type": [
"null",
"string"
],
"doc": "Full organizationNode hierarchy path"
},
{
"name": "features",
"type": [
"null",
"string"
],
"doc": "This contains the feature details associated with tenants."
},
{
"name": "solutionTemplates",
"type": [
"null",
"SolutionTemplate"
],
"doc": "Solution Template associated with the organization node"
},
{
"name": "profiles",
"type": [
"null",
{
"type": "array",
"items": "Profile"
}
],
"doc": "Array of profiles associated with the organization node"
},
{
"name": "children",
"type": [
"null",
{
"type": "array",
"items": "OrganizationNode"
}
],
"doc": "Child organization nodes"
}
]
}
}
]
},
{
"name": "isDefault",
"type": "boolean",
"doc": "Flag only set to true for the default tenant"
},
{
"name": "parent",
"type": {
"type": "record",
"name": "Parent",
"fields": [
{
"name": "tenantId",
"type": "string",
"doc": "Six digit unique tenant identifier for the parent node"
},
{
"name": "name",
"type": "string",
"doc": "Name of the parent node"
}
]
},
"doc": "Parent Organization Node"
}
]
}
]
}
]
}
И вот мой пример json data
{
"eventType": "TENANT_ADDED",
"timestamp": 1442921557056,
"tenantId": "GHIJKL",
"data": {
"name": "bmc",
"type": "TENANT",
"level": "Organization",
"key": "bmc",
"organizationNodeId": "VEKCPC",
"organizationHierarchy": "bmc",
"profiles": [],
"children": [{
"name": "Bangalore",
"type": "DEFAULT",
"level": "Site",
"key": "Bangalore",
"organizationNodeId": "OCNGVJ",
"organizationHierarchy": "bmc/Bangalore",
"features": "Test",
"profiles": [{
"description": "",
"profileId": "MH985X",
"name": "VoiceProfile"
}],
"children": [],
"solutionTemplate": {
"templateId": "FDASGG",
"description": "Solution Template for site Banglore",
"name": "TemplateSiteBanglore"
}
}, {
"name": "Site_Pune",
"type": "DEFAULT",
"level": "Site",
"key": "Site_Pune",
"organizationNodeId": "DUQICJ",
"organizationHierarchy": "bmc/Site_Pune",
"profiles": [],
"children": [],
"solutionTemplate": {
"templateId": "FDASWE",
"description": "Template for site Pune",
"templateName": "Template_Site_Pune"
}
}],
"tenantAttributes": [],
"tenantId": "VEKCPC",
"orgLevels": [{
"name": "Organization",
"position": 1
}, {
"name": "Site",
"position": 2
}, {
"name": "Department",
"position": 3
}, {
"name": "Team",
"position": 4
}],
"loginDomain": "bmc.com",
"parent": {
"tenantId": "HQAYQU",
"name": "Default"
},
"solutionTemplates": {
"templateId": "FDAGSA",
"description": "Template for Tenant",
"templateName": "Template_BMC"
},
"isDefault": false
}
}
При выполнении моего JMeter для генерации событие avro в kafka topi c, я получаю сообщение об ошибке
** Раздел ошибки **
2020-03-19 09: 23: 24 965 INFO oajeStandardJMeterEngine : Запуск теста! 2020-03-19 09: 23: 24,965 INFO oajsSampleEvent: Список sample_variables: [] 2020-03-19 09: 23: 24,966 INFO oajpjsJavaSampler: Создан класс: com.gslab.pepper.sampler.PepperBoxKafkaSampler. Использует tearDownTest: 2020-03-19 09: 23: 24,966 INFO oajguJMeterMenuBar: setRunning (true, local ) 2020-03-19 09: 23: 25,114 INFO oajeStandardJMeterEngine: не найдены активные группы потоков 2020-03- 19 09: 23: 25,114 ИНФОРМАЦИЯ oajeStandardJMeterEngine: начальные группы потоков tearDown 2020-03-19 09: 23: 25,114 ИНФОРМАЦИЯ oajeStandardJMeterEngine: стартовая группа tearDown Thread: Группа: 1: CreateTenant 2020-03-19 09: 23: 25,114 ИНФОРМАЦИЯ oajeStandardJe: группа CreateTenant. 2020-03-19 09: 23: 25,114 ИНФОРМАЦИЯ oajeStandardJMeterEngine: поток будет продолжен с ошибкой 2020-03-19 09: 23: 25,115 ИНФОРМАЦИЯ oajtThreadGroup: группа начальных потоков ... число = 1 потоков = 1 нарастание = 1 delayedStart = false 2020-03-19 09: 23: 25,115 INFO oajtThreadGroup: группа запущенных потоков с номером 1 2020-03-19 09: 23: 25,116 INFO oajtJMeterThread: Тема запущена: CreateTenant 1-1 2020-03-19 09: 23: 25 530 ОШИБКА oajtJMeterThread: тест не пройден! org. apache .avro.AvroTypeException: Ожидаемое начальное объединение. Получил VALUE_STRING в орг. apache .avro.io.JsonDecoder.error (JsonDecoder. java: 514) ~ [перечень-0.0.1-SNAPSHOT.jar:?] В орг. apache .avro. io.JsonDecoder.readIndex (JsonDecoder. java: 433) ~ [pepper-box-0.0.1-SNAPSHOT.jar :?] at org. apache .avro.io.ResolvingDecoder.readIndex (ResolvingDecoder. java) : 282) ~ [pepper-box-0.0.1-SNAPSHOT.jar :?] at org. apache .avro.generi c .GenericDatumReader.readWithoutConversion (GenericDatumReader. java: 178) ~ [перечница -0.0.1-SNAPSHOT.jar :?] at org. apache .avro.generi c .GenericDatumReader.read (GenericDatumReader. java: 151) ~ [pepper-box-0.0.1-SNAPSHOT.jar :?] at org. apache .avro.generi c .GenericDatumReader.readField (GenericDatumReader. java: 248) ~ [pepper-box-0.0.1-SNAPSHOT.jar :?] в орг. apache .avro.generi c .GenericDatumReader.readRecord (GenericDatumReader. java: 237) ~ [pepper-box-0.0.1-SNAPSHOT.jar :?] в орг. apache .avro.generi c .GenericDatumReader.readWithoutConversion (GenericDatumReader. java: 170) ~ [pepper-box-0.0.1-SNAPSHOT.jar :?] в орг. apache .avro.generi c .GenericDatumReader.read (GenericDatumReader. java: 151) ~ [pepper-box-0.0.1-SNAPSHOT.jar :?] в орг. apache .avro.generi c. GenericDatumReader.read (GenericDatumReader. java: 144) ~ [pepper-box-0.0.1-SNAPSHOT.jar :?] в com.gslab.pepper.loadgen.impl.AvroSchemaLoadGenerator.nextMessage (AvroSchemaLoadGenerator. 10). * ) ~ [pepper-box-0.0.1-SNAPSHOT.jar :?] на com.gslab.pepper.config.avroschema.AvroSchemaConfigElement.iterationStart (AvroSchemaConfigElement. java: 67) ~ [pepper-box-0.0.1- SNAPSHOT.jar :?] at org. apache .jmeter.control.GenericController.fireIterationStart (GenericController. java: 399) ~ [ApacheJMeter_core.jar: 5.2.1] в орг. apache .jmeter.control. GenericController.fireIterEvents (GenericController. java: 391) ~ [ApacheJMeter_core.jar: 5.2.1] в org. apache .jmeter.control.GenericController.next (GenericController. java: 160) jarc : 5.2.1] в орг. apache .jmeter.control.LoopController.next (LoopController. java: 135) ~ [ApacheJMeter_core.jar: 5.2.1] в орг. apache .jmeter.threads.AbstractThreadGroup.next (AbstractThreadGroup. java: 92) ~ [ApacheJMeter_core.jar: 5.2.1] в орг. apache .jmeter.threads.JMeterThread.run (JMeterThread. java: 255) [ApacheJMeter_core.jar: 5.2.1] на java .lang. Thread.run (Thread. java: 834) [?:?] 2020-03-19 09: 23: 25,530 ИНФОРМАЦИЯ oajtJMeterThread: Тема завершена: CreateTenant 1-1 2020-03-19 09: 23: 25,531 ИНФОРМАЦИЯ oajeStandardJMeterEngine: Уведомление слушателей теста о завершении теста