[
https://issues.apache.org/jira/browse/GORA-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13418280#comment-13418280
]
Ed Kohlwey commented on GORA-94:
--------------------------------
Ferdy,
Yes, ByteBuffer (as you note) could be protected to make them immutable. I
think I would just do a copy of any buffer passed in and then do a
.asReadOnlyBuffer() when the getters are called.
CharSequences can also be stored as strings using the toString() on the setter
to guarantee that the stored copy is immutable. By default Avro will put in
Utf8's but we can do some processing on the getters to make sure no users gain
access them.
This might be the best thing for the moment, although it will have negative
implications for the garbage collector in a map/reduce type context.
> Upgrade to Apache Avro 1.7.x
> ----------------------------
>
> Key: GORA-94
> URL: https://issues.apache.org/jira/browse/GORA-94
> Project: Apache Gora
> Issue Type: Sub-task
> Components: build process, storage
> Affects Versions: 0.2
> Reporter: Lewis John McGibbney
> Assignee: Ed Kohlwey
> Fix For: 0.3
>
> Attachments: GORA-94-v2.patch, GORA-94.patch
>
>
> I am not sure what this involves as of yet but I have a small feeling that
> it's going to be some reasonably major work...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira