[
https://issues.apache.org/jira/browse/AVRO-1608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tom White updated AVRO-1608:
----------------------------
Attachment: AVRO-1608.patch
Here's a patch for discussion, which has the deprecations. I'm not sure we need
to add overloaded factory methods to Schema given that you can use
SchemaBuilder, e.g.
{noformat}
SchemaBuilder.builder().intBuilder().prop("p", "v").endInt()
SchemaBuilder.enumeration("myenum").aliases("foo", "bar")
.prop("p", "v").symbols("a", "b”)
{noformat}
Also, it would be good to deprecate Schema#addFields, but this would require
that users have to use SchemaBuilder to build recursive schemas. Would that be
OK? (Internally, we would change SchemaBuilder to use an API like the one Doug
suggests [in this
comment|https://issues.apache.org/jira/browse/AVRO-261?focusedCommentId=12828354&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12828354].)
> Deprecate mutator methods on Schema
> -----------------------------------
>
> Key: AVRO-1608
> URL: https://issues.apache.org/jira/browse/AVRO-1608
> Project: Avro
> Issue Type: Improvement
> Components: java
> Affects Versions: 1.7.7
> Reporter: Tom White
> Assignee: Tom White
> Fix For: 1.7.8
>
> Attachments: AVRO-1608.patch
>
>
> This is a follow on to AVRO-261. It would be good to deprecate
> JsonProperties#addProp, Schema#addAlias, and Schema.Field#addAlias, and
> remove them in 1.8.0. Instead users should use SchemaBuilder, or we could
> also provide overloaded variants of the factory methods on Schema to specify
> properties and aliases.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)