[
https://issues.apache.org/jira/browse/HADOOP-5065?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chris Douglas updated HADOOP-5065:
----------------------------------
Attachment: 5065-0.patch
This seems like the easiest fix:
{noformat}
- public void setOutputFormatClass(Class<? extends OutputFormat<?,?>> cls
+ public void setOutputFormatClass(Class<? extends OutputFormat> cls
{noformat}
The problem is that SequenceFileOutputFormat is also a generic type, so
OutputFormat<?,?> is not a subtype.
This will also be an issue for generic mapreduce.Mapper and mapreduce.Reducer
types, as the set methods also use this convention.
> setOutputFormatClass in mapreduce.Job fails for SequenceFileOutputFormat
> ------------------------------------------------------------------------
>
> Key: HADOOP-5065
> URL: https://issues.apache.org/jira/browse/HADOOP-5065
> Project: Hadoop Core
> Issue Type: Bug
> Affects Versions: 0.20.0
> Reporter: Chris Douglas
> Attachments: 5065-0.patch
>
>
> {noformat}
> [javac] /.../snip.java:201: setOutputFormatClass(java.lang.Class<?
> extends org.apache.hadoop.mapreduce.OutputFormat<?,?>>) in \
> org.apache.hadoop.mapreduce.Job cannot be applied to
> (java.lang.Class<org.apache.hadoop.mapreduce.lib.output.SequenceFileOutputFormat>)
> [javac] job.setOutputFormatClass(SequenceFileOutputFormat.class);
> [javac] ^
> {noformat}
> The signatures for get\{Input,Output\}FormatClass are probably too
> restrictive:
> {code}
> public void setOutputFormatClass(Class<? extends OutputFormat<?,?>> cls)
> throws IllegalStateException
> {code}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.