[ 
https://issues.apache.org/jira/browse/THRIFT-628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bryan Duxbury updated THRIFT-628:
---------------------------------

    Attachment: thrift-628.patch

This should do the trick. Note that the only change is to Union structs, since 
that's the only type of struct that uses the field id in the hashcode.

> Hash code method for _Fields objects does not behave as expected
> ----------------------------------------------------------------
>
>                 Key: THRIFT-628
>                 URL: https://issues.apache.org/jira/browse/THRIFT-628
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (Java)
>    Affects Versions: 0.2
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Critical
>             Fix For: 0.2
>
>         Attachments: thrift-628.patch
>
>
> It turns out that Enums in Java don't have good hashcode behavior. It uses 
> object ID, which can be inconsistent between different invocations of the 
> same application, which breaks things like Hadoop partitioning. We should use 
> the hash of the actual thrift field id instead of the hash of the enum 
> version of the field.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to