You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Jay Booth (JIRA)" <ji...@apache.org> on 2009/11/03 00:08:59 UTC

[jira] Updated: (MAPREDUCE-1178) MultipleInputs fails with ClassCastException

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

Jay Booth updated MAPREDUCE-1178:
---------------------------------

    Attachment: MAPREDUCE-1178.patch

attached patch fixes ClassCastException and expands unit test to catch a wider variety of problems

> MultipleInputs fails with ClassCastException 
> ---------------------------------------------
>
>                 Key: MAPREDUCE-1178
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-1178
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>    Affects Versions: 0.21.0
>            Reporter: Jay Booth
>            Priority: Blocker
>             Fix For: 0.21.0
>
>         Attachments: MAPREDUCE-1178.patch
>
>
> When running MultipleInputs against the new API, we get failures with this ClassCastException:
> java.lang.ClassCastException: org.apache.hadoop.mapreduce.lib.input.TaggedInputSplit cannot be cast to org.apache.hadoop.mapreduce.lib.input.FileSplit
> 	at org.apache.hadoop.mapreduce.lib.input.LineRecordReader.initialize(LineRecordReader.java:70)
> 	at org.apache.hadoop.mapreduce.lib.input.KeyValueLineRecordReader.initialize(KeyValueLineRecordReader.java:59)
> 	at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.initialize(MapTask.java:439)
> 	at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:599)
> 	at org.apache.hadoop.mapred.MapTask.run(MapTask.java:323)
> 	at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:257)
> The unit test for MultipleInputs doesn't actually run a job so this snuck through while still passing the unit test.  Attached patch fixes the unit test to expose the failure and does a little casting kung-fu in LineRecordReader to avoid the error.

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