[
https://issues.apache.org/jira/browse/SPARK-15451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15308509#comment-15308509
]
Marcelo Vanzin commented on SPARK-15451:
----------------------------------------
BTW, another thing this avoids is runtime errors like the following I just ran
into:
{noformat}
Exception in thread "main" java.lang.NoSuchMethodError:
java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView;
at org.apache.spark.rpc.netty.Dispatcher.stop(Dispatcher.scala:176)
at org.apache.spark.rpc.netty.NettyRpcEnv.cleanup(NettyRpcEnv.scala:291)
at
org.apache.spark.rpc.netty.NettyRpcEnv.shutdown(NettyRpcEnv.scala:269)
at org.apache.spark.SparkEnv.stop(SparkEnv.scala:91)
at
org.apache.spark.SparkContext$$anonfun$stop$11.apply$mcV$sp(SparkContext.scala:1787)
at org.apache.spark.util.Utils$.tryLogNonFatalError(Utils.scala:1219)
{noformat}
That's because when compiling against jdk8, the code links against a new
interface that was added in jdk8 and doesn't exist in jdk7, even though the
same code compiles fine against both versions. Compiling against the jdk7
libraries avoids the issue.
> Spark PR builder should fail if code doesn't compile against JDK 7
> ------------------------------------------------------------------
>
> Key: SPARK-15451
> URL: https://issues.apache.org/jira/browse/SPARK-15451
> Project: Spark
> Issue Type: Bug
> Components: Build
> Affects Versions: 2.0.0
> Reporter: Marcelo Vanzin
>
> We need to compile certain parts of the build using jdk8, so that we test
> things like lambdas. But when possible, we should either compile using jdk7,
> or provide jdk7's rt.jar to javac. Otherwise it's way too easy to slip in
> jdk8-specific library calls.
> I'll take a look at fixing the maven / sbt files, but I'm not sure how to
> update the PR builders since this will most probably require at least a new
> env variable (to say where jdk7 is).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]