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 "Arun C Murthy (JIRA)" <ji...@apache.org> on 2008/07/02 02:26:45 UTC
[jira] Issue Comment Edited: (HADOOP-3665) WritableComparator
newKey() fails for NullWritable
[ https://issues.apache.org/jira/browse/HADOOP-3665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609753#action_12609753 ]
acmurthy edited comment on HADOOP-3665 at 7/1/08 5:25 PM:
---------------------------------------------------------------
I'm ok with this patch, though making WritableComparator a Configurable might be a stretch... given that we don't have and Configurable Writables. But I'm happy to bow down to the wisdom of the crowd.
was (Author: acmurthy):
I'm ok with this patch, though making WritableComparator a Configurable might be a stretch...
> WritableComparator newKey() fails for NullWritable
> --------------------------------------------------
>
> Key: HADOOP-3665
> URL: https://issues.apache.org/jira/browse/HADOOP-3665
> Project: Hadoop Core
> Issue Type: Bug
> Components: io
> Affects Versions: 0.16.0
> Environment: n/a
> Reporter: Lukas Vlcek
> Priority: Minor
> Fix For: 0.19.0
>
> Attachments: 3665-0.patch, 3665-1.patch, HADOOP-3665.path
>
>
> It is not possible to use NullWritable as a key in order to suppress key value in output.
> Syndrome exception:
> Caused by: java.lang.IllegalAccessException: Class org.apache.hadoop.io.WritableComparator can not access a member of class org.apache.hadoop.io.NullWritable with modifiers "private"
> The problem is that NullWritable is a singleton and does not provide public non-parametric constructor. The following code in WritableComparator causes the exception: return (WritableComparable)keyClass.newInstance();
> Proposed simple solution is to use ReflectionUtils instead (it requires modification as well).
> This issue is probably related to HADOOP-2922
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.