I'm using Spark 3.1.1 which uses Scala 2.12, and the pre-built Livy downloaded from here uses Scala 2.11 (one could find the folder named repl_2.11-jars/
after unzip).
Referred to the comment made by Aliaksandr Sasnouskikh, Livy needs to be rebuilt or it'll throw error {'msg': 'requirement failed: Cannot find Livy REPL jars.'}
even in POST Session.
In the README.md, it mentioned:
By default Livy is built against Apache Spark 2.4.5
If I'd like to rebuild Livy, how could I change the spark version that it is built with?
Thanks in advance.
You can rebuild Livy passing spark-3.0 profile in maven to create a custom build for spark 3, for example:
This profile is defined in pom.xml, the default one installs Spark 3.0.0. You can change it to use different spark version.
As long as I know, Livy supports spark 3.0.x. But worth testing with 3.1.1, and let us know :)