[
https://issues.apache.org/jira/browse/GORA-94?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13417645#comment-13417645
]
Ed Kohlwey commented on GORA-94:
--------------------------------
Here's the github diff view - its also a convenient place to put code review
comments.
https://github.com/ekohlwey/gora/compare/trunk...avro-1.7.0
If its more convenient I can do a reviewboard post too once I'm happy calling
the patch more-or-less final.
The upgrade is non-trivial, but I think most client API's should compile with a
few exceptions.
The first change I made was to refactor the whole Persistent system to remove
the StateManager. It was obvious that it had been abandoned since the new and
readable states weren't being used; additionally, its my opinion that using a
lazy callback or something inside persistent objects would be better than using
something like a readable field, and weather or not a field is new is basically
the same thing as if all the fields are dirty, so this didn't make sense either.
The next thing I wanted to do was remove the writing of transient information
(the dirtyness) from being a hack on top of Avro. This was necessary since the
Avro encoder system is now packaged up in such a way that you really can't
override ResolvingDecoder, which was necessary for the previous implementation.
I did this by doing a total rework of the Gora compiler so that it extends
AvroCompiler. This also makes this class more manageable because the 1.7 Avro
compiler uses velocity templates and has become fairly extendable. The new
scheme for tracking dirtyness is to augment each schema with a new field,
__g__dirty, which keeps track of what fields are dirty.
I also have started work on making dirty more reliable. Using Utf8 classes and
ByteBuffers, it is possible to make a field dirty without the set() method for
the field intercepting the mutation. I think this is not the right thing.
Structural changes to records, maps, lists, and unions are tracked
automatically, however, as are changes on immutable types such as numbers and
booleans.
Most other modifications are trivial. Maps are represented by java.util.Map and
arrays are represented by java.util.List now, so all the references to the
Avro-ish way of doing things have been updated.
> 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