Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/apache-kafka/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache kafka 执行jmeter时发生Avro异常_Apache Kafka_Jmeter_Avro - Fatal编程技术网

Apache kafka 执行jmeter时发生Avro异常

Apache kafka 执行jmeter时发生Avro异常,apache-kafka,jmeter,avro,Apache Kafka,Jmeter,Avro,我有以下模式(.avsc文件) 下面是我的json数据示例 { "eventType": "TENANT_ADDED", "timestamp": 1442921557056, "tenantId": "GHIJKL", "data": { "name": "bmc", "type": "TENANT", "level": "Organization", "key": "bmc", "organizationNodeId": "VEKCPC

我有以下模式(.avsc文件)

下面是我的json数据示例

{
  "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生成kafka主题中的avro事件时,我遇到了一个错误

**错误部分**

2020-03-19 09:23:24965信息o.a.j.e.StandardJMeterEngine:运行测试! 2020-03-19 09:23:24965信息o.a.j.s.SampleEvent:样本变量列表:[] 2020-03-19 09:23:24966信息o.a.j.p.j.s.JavaSampler:创建的类:com.gslab.pepper.sampler.PepperBoxKafkaSampler。使用撕裂测试: 2020-03-19 09:23:24966信息o.a.j.g.u.JMeterMenuBar:setRunning(真实,本地) 2020-03-19 09:23:25114信息o.a.j.e.StandardJMeterEngine:未找到已启用的线程组 2020-03-19 09:23:25114信息o.a.j.e.StandardJMeterEngine:开始拆卸螺纹组 2020-03-19 09:23:25114信息o.a.j.e.StandardJMeterEngine:开始拆卸螺纹组:1:创建租户 2020-03-19 09:23:25114信息o.a.j.e.StandardJMeterEngine:为组CreateTenant启动1个线程。 2020-03-19 09:23:25114信息o.a.j.e.StandardJMeterEngine:线程将继续出错 2020-03-19 09:23:25115信息o.a.j.t.ThreadGroup:启动线程组。。。数量=1线程=1爬升=1延迟启动=错误 2020-03-19 09:23:25115信息o.a.j.t.螺纹组:已启动螺纹组编号1 2020-03-19 09:23:25116信息o.a.j.t.JMeterThread:线程已启动:CreateTenant 1-1 2020-03-19 09:23:25530错误o.a.j.t.JMeterThread:测试失败! org.apache.avro.AvroTypeException:应为启动联合。获取值\u字符串 在org.apache.avro.io.JsonDecoder.error(JsonDecoder.java:514)~[pepper-box-0.0.1-SNAPSHOT.jar:?] 在org.apache.avro.io.JsonDecoder.readIndex(JsonDecoder.java:433)~[pepper-box-0.0.1-SNAPSHOT.jar:?] 在org.apache.avro.io.ResolvingDecoder.readIndex(ResolvingDecoder.java:282)~[pepper-box-0.0.1-SNAPSHOT.jar:?] 在org.apache.avro.generic.GenericDatumReader.readWithoutConversion(GenericDatumReader.java:178)~[pepper-box-0.0.1-SNAPSHOT.jar:?] 在org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:151)~[pepper-box-0.0.1-SNAPSHOT.jar:?] 在org.apache.avro.generic.GenericDatumReader.readField(GenericDatumReader.java:248)~[pepper-box-0.0.1-SNAPSHOT.jar:?] 在org.apache.avro.generic.GenericDatumReader.readRecord(GenericDatumReader.java:237)~[pepper-box-0.0.1-SNAPSHOT.jar:?] 在org.apache.avro.generic.GenericDatumReader.readWithoutConversion(GenericDatumReader.java:170)~[pepper-box-0.0.1-SNAPSHOT.jar:?] 在org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:151)~[pepper-box-0.0.1-SNAPSHOT.jar:?] 在org.apache.avro.generic.GenericDatumReader.read(GenericDatumReader.java:144)~[pepper-box-0.0.1-SNAPSHOT.jar:?] 在com.gslab.pepper.loadgen.impl.AvroSchemaLoadGenerator.nextMessage(AvroSchemaLoadGenerator.java:79)~[pepper-box-0.0.1-SNAPSHOT.jar:?] 在com.gslab.pepper.config.avroschema.AvroSchemaConfigElement.iterationStart(AvroSchemaConfigElement.java:67)~[pepper-box-0.0.1-SNAPSHOT.jar:?] 在org.apache.jmeter.control.GenericController.fireIterationStart(GenericController.java:399)~[ApacheJMeter_core.jar:5.2.1] 在org.apache.jmeter.control.GenericController.fireIterEvents(GenericController.java:391)~[ApacheJMeter_core.jar:5.2.1] 在org.apache.jmeter.control.GenericController.next(GenericController.java:160)~[ApacheJMeter_core.jar:5.2.1] 在org.apache.jmeter.control.LoopController.next(LoopController.java:135)~[ApacheJMeter_core.jar:5.2.1] 在org.apache.jmeter.threads.AbstractThreadGroup.next(AbstractThreadGroup.java:92)~[ApacheJMeter_core.jar:5.2.1] 在org.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:25530信息o.a.j.t.JMeterThread:线程已完成:CreateTenant 1-1 2020-03-19 09:23:25531信息o.a.j.e.StandardJMeterEngine:通知测试监听器测试结束 2020-03-19 09:23:25531信息o.a.j.g.u.JMeterMenuBar:setRunning(错误,本地)


有人能解释一下为什么我会出现错误吗?

你能粘贴一个完整的stacktrace吗?更新了错误部分检查一下,特别是这里提到的AVRO-1582。我已经检查并尝试过了,但这对我不起作用,谢谢
{
  "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
  }
}