Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
HDFS >> mail # dev >> Hadoop-2 generics compilation error


+
lars hofhansl 2012-06-29, 05:27
Copy link to this message
-
Re: Hadoop-2 generics compilation error
HDFS-3113 is committed? Or, are you running with the patch yourself?

It's still PA and I see Daryn reviewing it yet...

Arun

On Jun 28, 2012, at 10:27 PM, lars hofhansl wrote:

> Since HDFS-3113 was integrated into Hadoop-2 I get the compilation errors of the following type:
>
> [ERROR] /home/lars/dev/hadoop-2/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/fs/http/server/HttpFSServer.java:[407,36] incompatible types; no instance(s) of type variable(s) V exist so that V conforms to boolean
>
>
> Indeed at line 407 I see:
>
>         boolean hasData = params.get(DataParam.NAME, DataParam.class);
>
>
> When I change that to
>         Boolean hasData = params.get(DataParam.NAME, DataParam.class);
>
>
> instead (along with long to Long, short to Short, etc, later in that file), everything compiles fine.
>
> $ javac -version
> javac 1.6.0_24
>
>
> $ java -version
> java version "1.6.0_24"
> OpenJDK Runtime Environment (IcedTea6 1.11.3) (fedora-67.1.11.3.fc16-x86_64)
> OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
>
> Apparently OpenJDK gets mixed up on the type inference here. Can we change this in the way I suggest so that Hadoop-2 (and presumably trunk) can be
> compiled with OpenJDK?
> I'm happy to create a jira and (trivial) patch.
>
>
> Thanks.
>
> -- Lars
>

--
Arun C. Murthy
Hortonworks Inc.
http://hortonworks.com/
+
Alejandro Abdelnur 2012-06-29, 18:08
+
Andy Isaacson 2012-06-29, 19:01
+
Andy Isaacson 2012-06-29, 21:43
+
Alejandro Abdelnur 2012-06-29, 22:26
+
lars hofhansl 2012-06-29, 22:49
+
Alejandro Abdelnur 2012-06-29, 22:53
+
Andy Isaacson 2012-06-30, 00:12
+
Eli Collins 2012-06-29, 16:27