You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Bryan Duxbury (JIRA)" <ji...@apache.org> on 2009/11/17 22:28:39 UTC
[jira] Created: (THRIFT-628) Hash code method for _Fields objects
does not behave as expected
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
Reporter: Bryan Duxbury
Priority: Critical
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-628) Hash code method for _Fields objects
does not behave as expected
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated THRIFT-628:
---------------------------------
Patch Info: [Patch Available]
> 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.
[jira] Commented: (THRIFT-628) Hash code method for _Fields objects
does not behave as expected
Posted by "Nathan Marz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12779159#action_12779159 ]
Nathan Marz commented on THRIFT-628:
------------------------------------
+1
> 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.
[jira] Updated: (THRIFT-628) Hash code method for _Fields objects
does not behave as expected
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Updated: (THRIFT-628) Hash code method for _Fields objects
does not behave as expected
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated THRIFT-628:
---------------------------------
Component/s: Compiler (Java)
Description: 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.
Affects Version/s: 0.2
Fix Version/s: 0.2
Assignee: Bryan Duxbury
> 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
>
>
> 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.
[jira] Closed: (THRIFT-628) Hash code method for _Fields objects
does not behave as expected
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury closed THRIFT-628.
--------------------------------
Resolution: Fixed
I just committed this.
> 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.