【发布时间】:2016-02-16 19:49:48
【问题描述】:
我有一个简单的 avro 架构,如下所示:
{
"type": "record",
"name": "transaction",
"namespace": "com.mycompany",
"doc": "Transaction records",
"fields": [
{
"name": "version",
"type": "int",
"default": 1,
"doc": "version the class"
},
{
"name": "eventType",
"type": "string",
"default": "saleTransaction",
"doc": "event type"
},
{
"name": "writeTimestamp",
"type": "org.joda.time.DateTime",
"doc": "Timestamp when this event was written to the stream"
},
{
"name": "originatingClient",
"type": "string",
"doc": "identifier of the originating client"
}
}
当我使用 avro-maven-plugin 编译它时,我收到以下错误:
ERROR] 未能执行目标
目标的执行交易模式 org.apache.avro:avro-maven-plugin:1.8.0:schema 失败: “org.joda.time.DateTime”不是一个定义的名称。的类型 "writeTimestamp" 字段必须是定义的名称或 {"type": ...} 表达。 -> [帮助 1]
如何让它工作?
【问题讨论】:
标签: avro