nifi avro-找不到架构中定义的包名称空间

时间:2018-07-25 08:52:31

标签: json avro apache-nifi

我是NiFi和Avro的新手,我的任务是弄清楚它是否可以满足我团队的需求。我正在尝试使用NiFi将Json转换为Avro,但是在转换过程中,公告板上始终出现以下错误(注意,我在JsonTreeReader和AvroRecordSetWriter上使用“ ConvertRecord”处理器):

  

将路由到失败:java.lang.NullPointerException:com.product.subproduct.function.Message的messageId字段中com.product.subproduct.function.productID的null

以下是架构的快照:

{
  "type" : "record",
  "name" : "Message",
  "namespace" : "com.product.subproduct.function",
  "fields" : [ {
    "name" : "messageId",
    "type" : {
      "type" : "record",
      "name" : "productID",
      "fields" : [ {
        "name" : "subproductId",
        "type" : {
          "type" : "record",
          "name" : "subproductId",
          "fields" : [ {
            "name" : "value",
            "type" : "string"
          }, {
            "name" : "type",
            "type" : "string"
          } ]
        }
      }, {
        "name" : "accountId",
        "type" : "string"
      }, {
        "name" : "entityId",
        "type" : "string"
      }, {
        "name" : "clientId",
        "type" : "string"
      } ]
    }
  }

我是否需要提供架构中名称空间的完整路径,还是我错过了关键步骤?

非常感谢。

0 个答案:

没有答案