You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that the null declaration is invalid.
With avro 1.9.1 this cannot be used anymore, and when you try to fix it in schema registry you cant, because the old schema is validate:
! org.apache.avro.AvroTypeException: Invalid default for field suit: null not a {"type":"enum","name":"Suit","namespace":"com.mycompany","symbols":["SPADES", "HEARTS", "DIAMONDS", "CLUBS"]}
! at org.apache.avro.Schema.validateDefault(Schema.java:1542)
! at org.apache.avro.Schema.access$500(Schema.java:87)
! at org.apache.avro.Schema$Field.<init>(Schema.java:523)
! at org.apache.avro.Schema.parse(Schema.java:1649)
! at org.apache.avro.Schema$Parser.parse(Schema.java:1396)
! at org.apache.avro.Schema$Parser.parse(Schema.java:1384)
! at com.hortonworks.registries.schemaregistry.avro.AvroSchemaProvider.checkCompatibility(AvroSchemaProvider.java:67)
! at com.hortonworks.registries.schemaregistry.SchemaVersionLifecycleManager.checkCompatibility(SchemaVersionLifecycleManager.java:477)
! at com.hortonworks.registries.schemaregistry.SchemaVersionLifecycleManager.checkCompatibility(SchemaVersionLifecycleManager.java:452)
! at com.hortonworks.registries.schemaregistry.DefaultSchemaRegistry.checkCompatibility(DefaultSchemaRegistry.java:833)
! at com.hortonworks.registries.schemaregistry.webservice.SchemaRegistryResource.checkCompatibilityWithSchema(SchemaRegistryResource.java:908)
! at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
! at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
! at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
! at java.lang.reflect.Method.invoke(Method.java:498)
! at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
Is there any workaround to avoid this?
The text was updated successfully, but these errors were encountered:
@gmcoringa Once you have added schema into schema registry you can't modify it through UI. I don't see any other way apart from updating the schema in the database directly. You can look for "schemaText" column for the table "schema_version_info" and make your changes there.
@raju-saravanan thanks for the hint, also I will have to update all versions, because the default validation level is ALL, so if any version of a schema is invalid there is no way to get using schema registry client or update the schema.
With version
0.5.6
was possible to create schemas with enum like this:Note that the null declaration is invalid.
With avro
1.9.1
this cannot be used anymore, and when you try to fix it in schema registry you cant, because the old schema is validate:Is there any workaround to avoid this?
The text was updated successfully, but these errors were encountered: