hadoop-mapreduce-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MAPREDUCE-5020) Compile failure with JDK8
Date Wed, 11 Sep 2013 10:59:53 GMT

    [ https://issues.apache.org/jira/browse/MAPREDUCE-5020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13764200#comment-13764200
] 

Hudson commented on MAPREDUCE-5020:
-----------------------------------

SUCCESS: Integrated in Hadoop-Yarn-trunk #329 (See [https://builds.apache.org/job/Hadoop-Yarn-trunk/329/])
MAPREDUCE-5020. Compile failure with JDK8 (Trevor Robinson via tgraves) (tgraves: http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1521576)
* /hadoop/common/trunk/hadoop-mapreduce-project/CHANGES.txt
* /hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/partition/InputSampler.java

                
> Compile failure with JDK8
> -------------------------
>
>                 Key: MAPREDUCE-5020
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-5020
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 2.0.3-alpha, 2.1.0-beta
>         Environment: java version "1.8.0-ea"
> Java(TM) SE Runtime Environment (build 1.8.0-ea-b36e)
> Java HotSpot(TM) Client VM (build 25.0-b04, mixed mode)
>            Reporter: Trevor Robinson
>            Assignee: Trevor Robinson
>              Labels: build-failure, jdk8
>             Fix For: 3.0.0, 2.3.0, 2.1.1-beta
>
>         Attachments: MAPREDUCE-5020.patch
>
>
> Compiling {{org/apache/hadoop/mapreduce/lib/partition/InputSampler.java}} fails with
the Java 8 preview compiler due to its stricter enforcement of JLS 15.12.2.6 (for [Java 5|http://docs.oracle.com/javase/specs/jls/se5.0/html/expressions.html#15.12.2.6]
or [Java 7|http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.12.2.6]), which
demands that methods applicable via unchecked conversion have their return type erased:
> {noformat}
> [ERROR] hadoop-common/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/partition/InputSampler.java:[320,35]
error: incompatible types: Object[] cannot be converted to K[]
> {noformat}
> {code}
>   @SuppressWarnings("unchecked") // getInputFormat, getOutputKeyComparator
>   public static <K,V> void writePartitionFile(Job job, Sampler<K,V> sampler)

>       throws IOException, ClassNotFoundException, InterruptedException {
>     Configuration conf = job.getConfiguration();
>     final InputFormat inf = 
>         ReflectionUtils.newInstance(job.getInputFormatClass(), conf);
>     int numPartitions = job.getNumReduceTasks();
>     K[] samples = sampler.getSample(inf, job); // returns Object[] according to JLS
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message