You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2006/03/14 21:10:41 UTC
[jira] Commented: (HADOOP-80) binary key
[ http://issues.apache.org/jira/browse/HADOOP-80?page=comments#action_12370406 ]
Doug Cutting commented on HADOOP-80:
------------------------------------
Overall this looks good. A couple of questions:
1. Why call setSize(0) in read()? This looks like a no-op. Am I missing something?
2. Why bother to use md5 for hashCode()? That could be expensive. Why not implement this like java.util.Arrays.hashCode() and UTF8.hashCode():
public int hashCode() {
int hash = 1;
for (int i = 0; i < size; i++)
hash = (31 * hash) + (int)bytes[i];
return hash;
}
> binary key
> ----------
>
> Key: HADOOP-80
> URL: http://issues.apache.org/jira/browse/HADOOP-80
> Project: Hadoop
> Type: New Feature
> Components: io
> Versions: 0.1
> Reporter: Owen O'Malley
> Assignee: Owen O'Malley
> Fix For: 0.1
> Attachments: binary-key.patch
>
> I needed a binary key type, so I extended BytesWritable to be comparable also.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira