You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Maulik Gandhi (JIRA)" <ji...@apache.org> on 2015/01/20 19:39:34 UTC
[jira] [Commented] (AVRO-1634) Clear all fields / Reset all fields
to default value on Record template
[ https://issues.apache.org/jira/browse/AVRO-1634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14284178#comment-14284178 ]
Maulik Gandhi commented on AVRO-1634:
-------------------------------------
* I was thinking of making a change in Velocity template: [Record | https://github.com/apache/avro/blob/branch-1.7/lang/java/compiler/src/main/velocity/org/apache/avro/compiler/specific/templates/java/classic/record.vm]
* I will post a patch, once I have things working on.
> Clear all fields / Reset all fields to default value on Record template
> -----------------------------------------------------------------------
>
> Key: AVRO-1634
> URL: https://issues.apache.org/jira/browse/AVRO-1634
> Project: Avro
> Issue Type: New Feature
> Components: java
> Reporter: Maulik Gandhi
> Priority: Minor
>
> As a developer,
> it would be nice to have a feature, API which will expose the functionality of clearing all fields on Record or set them to default value if the attribute has default value, so that the consumers do not have to write custom methods for the use case described before.
> Also when a Builder pattern is used for creating Objects from Record, builders can be re-used, thus reducing heap memory usage.
> Discussion around same topic can be found in [archives | http://mail-archives.apache.org/mod_mbox/avro-user/201501.mbox/%3CCALEq1Z8M8m1JH=tuiAkTjJUteqBGh-FQTB0uPP4hu_PKsc-QAg@mail.gmail.com%3E]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)