-
Notifications
You must be signed in to change notification settings - Fork 831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add version field serializer #274
Conversation
* | ||
* @return | ||
*/ | ||
short value() default 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be int, since writeVarInt
is used to write the version.
I like the serializer idea! It has less overhead than |
It would be great if the pull request would update the readme as well. |
Hi, thanks for attention. Actually magic number worked in my scenario (because i somehow used FieldSerializer to store objects to HBase...), so i figured that this could work for someone else, but not necessarily (yes FieldSerializer could write the same number at the very beginning, with small possibility, though the lost could be endured). I will the clean up the code and update later. |
Additionally, i think forward compatibility could be achieved with appending version before every field, and use chunked i/o to support skipping. |
Hi there, I believe the latest commit will do the work, since there is no need to introduce more overhead for forward compatibility. |
Add version field serializer
Thanks! |
A version based serializer with backward compatibility (no forward compatibility).
This can be used for scenarios like: