Good day!
I am using Spark 2.1.1 on HDinsight in Azure. I have built Hail as listed here https://hail.is/docs/stable/getting_started.html for Spark version 2.1.1 . However, when I execute in ipython
from hail import *
hc = HailContext()
I get this error:
Py4JJavaError: An error occurred while calling z:is.hail.HailContext.apply.
: java.lang.IllegalArgumentException: requirement failed: This Hail JAR was compiled for Spark 2.1.1,
but the version of Spark available at runtime is 2.1.1.2.6.2.25-1.
at scala.Predef$.require(Predef.scala:224)
at is.hail.HailContext$.configureAndCreateSparkContext(HailContext.scala:40)
at is.hail.HailContext$.apply(HailContext.scala:166)
at is.hail.HailContext.apply(HailContext.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
at py4j.Gateway.invoke(Gateway.java:280)
at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
at py4j.commands.CallCommand.execute(CallCommand.java:79)
at py4j.GatewayConnection.run(GatewayConnection.java:214)
at java.lang.Thread.run(Thread.java:748)
Looks like py4j treats Spark version as taking real spark version 2.1.1 and appending Hadoop version which is 2.6.2.25-1 which creates version mismatch between framework version and Hail JAR version.
How to fix it and if there is a workaround?
Regards,
-Yuriy