-
Notifications
You must be signed in to change notification settings - Fork 387
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
Fix protobuf serde errors #425
base: master
Are you sure you want to change the base?
Conversation
I used this patch in cdh5.1.2 with Hive 0.12.0-cdh5.1.0 confirmed that he bug in Issue#400 was resolved! this patch look good to me. |
I used this with Hive 0.13.1-cdh5.3.1 and Protobuf 2.5.0 in order to resolve Issue #400. Any chance of this getting merged soon? Thanks for this patch angushe! |
Solves #400 for me on Hive 0.13.1 and Protobuf 2.5.0 on AWS AMI 3.3.1. |
Used to resolve issue #400 with Protobuf 2.5.0, Hive 0.14.0 & HDP 2.2. Thanks |
|
||
@Override | ||
public int hashCode() { | ||
return descriptor.hashCode(); |
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.
should this mix in structFields.hashCode() too? This is still correct, but will have more hash collisions in the case of comparing things with the same descriptor but different structFields (idk if that's common or not)
@rangadi I don't know too much about protobuf dynamic messages, would you mind giving this a look too? There's a lot of casting + isntanceof going on in here where there previously wasn't -- is that part of the direct fix for the issue, or are these just the only way to use DynamicMessage? |
We haven't used Hive serde's actively. I will take look anyway. |
Message.Builder builder; | ||
if (data instanceof Message.Builder) { | ||
builder = (Message.Builder)data; | ||
} else if (data instanceof Message) { |
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.
since this fix uses only the builder, do you ever expect Message?
The fix looks good. I am not sure about Alex's comment on hashCode(). I just have one comment: if we ever expect Message object. |
Let's assume this patch will never be merged. In this case, I would like to optimize this pull request's SEO. I was seeing issues like this when running Hive queries on Protobuf external tables requiring a MapReduce job. These issues would not present on queries like:
But when running a query like this:
I would get a traceback:
Applying both revisions of this PR fixed the issue conclusively. |
Really thanks for this and please merge it asap. I took the patch and it works like a charm now. |
Looks like way back when we had some questions on this PR that didn't get answered. Anyone interested in taking a look? I think we can merge this if someone wants to verify it's still working + address the review feedback? |
I am using elephant-bird-hive-4.15.jar but still I am getting the same issue why??? |
|
Hi,
This is a pull request trying to fix the same problem described in pull request #400, and the fix has been tested successfully on Hive 0.12/0.13 and Protobuf 2.4.1/2.5.0.
Any comments?
Thanks
Angus