Использование плагина kafka-schema-registry-maven-plugin с родительскими и дочерними схемамиJAVA

Программисты JAVA общаются здесь
Ответить Пред. темаСлед. тема
Anonymous
 Использование плагина kafka-schema-registry-maven-plugin с родительскими и дочерними схемами

Сообщение Anonymous »

У меня есть проект, в котором есть три схемы: MetaModel.avsc, RevisionModel.avsc и RecentChangeEventModel.avsc. Где RecentChangeEventModel ссылается на остальные как на вложенные объекты, например:

Код: Выделить всё

{
"namespace": "org.taulin.model",
"type": "record",
"name": "RecentChangeEvent",
"fields": [
{
"name": "schema",
"type": [
"null",
"string"
],
"default": null
},
{
"name": "meta",
"type": [
"null",
"Meta"
],
"default": null
},
{
"name": "id",
"type": [
"null",
"long"
],
"default": null
},
{
"name": "type",
"type": [
"null",
"string"
],
"default": null
},
{
"name": "namespace",
"type": [
"null",
"int"
],
"default": null
},
{
"name": "title",
"type": [
"null",
"string"
],
"default": null
},
{
"name": "titleUrl",
"type": [
"null",
"string"
],
"default": null
},
{
"name": "comment",
"type": [
"null",
"string"
],
"default": null
},
{
"name": "timestamp",
"type": [
"null",
"long"
],
"default": null
},
{
"name": "user",
"type": [
"null",
"string"
],
"default": null
},
{
"name": "bot",
"type": [
"null",
"boolean"
],
"default": null
},
{
"name": "notifyUrl",
"type": [
"null",
"string"
],
"default": null
},
{
"name": "serverUrl",
"type": [
"null",
"string"
],
"default": null
},
{
"name": "serverName",
"type": [
"null",
"string"
],
"default": null
},
{
"name": "serverScriptPath",
"type": [
"null",
"string"
],
"default": null
},
{
"name": "wiki",
"type": [
"null",
"string"
],
"default": null
},
{
"name": "parsedComment",
"type": [
"null",
"string"
],
"default": null
},
{
"name": "minor",
"type": [
"null",
"boolean"
],
"default": null
},
{
"name": "patrolled",
"type": [
"null",
"boolean"
],
"default": null
},
{
"name": "length",
"type": [
"null",
"Revision"
],
"default": null
},
{
"name": "revision",
"type": [
"null",
"Revision"
],
"default":  null
}
]
}
И у меня есть следующая конфигурация с плагином kafka-schema-registry-maven-plugin:

Код: Выделить всё

io.confluent
kafka-schema-registry-maven-plugin
7.7.1


http://localhost:8081/


${project.basedir}/src/main/avro/MetaModel.avsc
${project.basedir}/src/main/avro/RevisionModel.avsc
${project.basedir}/src/main/avro/RecentChangeEventModel.avsc


AVRO
AVRO
AVRO




Meta
Meta


Revision
Revision


RecentChangeEvent
RecentChangeEvent





register


Когда я пытаюсь выполнить mvnschema-registry:register, возникает следующая ошибка:

Код: Выделить всё

[ERROR] Could not parse Avro schema
org.apache.avro.SchemaParseException: Undefined name: "org.taulin.model.Meta"
at org.apache.avro.Schema.parse (Schema.java:1697)
at org.apache.avro.Schema.parse (Schema.java:1823)
at org.apache.avro.Schema.parse (Schema.java:1736)
at org.apache.avro.Schema$Parser.parse (Schema.java:1471)

Я пробовал менять конфигурации плагинов и способ ссылки на каждую схему, но, похоже, ничего не работает. Похоже, что плагин не предназначен для использования, когда схемы ссылаются друг на друга таким образом.

Подробнее здесь: https://stackoverflow.com/questions/790 ... ld-schemas
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение
  • Использование плагина kafka-schema-registry-maven-plugin с родительскими и дочерними схемами
    Anonymous » » в форуме JAVA
    0 Ответы
    38 Просмотры
    Последнее сообщение Anonymous
  • Не удалось найти Cluentent Kafka Avro Serializer & Schema Registry Client в Maven
    Anonymous » » в форуме JAVA
    0 Ответы
    21 Просмотры
    Последнее сообщение Anonymous
  • Не удалось найти Cluentent Kafka Avro Serializer & Schema Registry Client в Maven
    Anonymous » » в форуме JAVA
    0 Ответы
    13 Просмотры
    Последнее сообщение Anonymous
  • Не удалось найти Cluentent Kafka Avro Serializer & Schema Registry Client в Maven
    Anonymous » » в форуме JAVA
    0 Ответы
    10 Просмотры
    Последнее сообщение Anonymous
  • При выполнении org.apache.avro:avro-maven-plugin:1.11.3:schema: org/apache/avro/Schema$Parser отсутствовал необходимый к
    Anonymous » » в форуме JAVA
    0 Ответы
    66 Просмотры
    Последнее сообщение Anonymous

Вернуться в «JAVA»