I have created an aws AMI which contain a local maven repository, and it is locate in /usr/local/
I then use that AMI to create AWS EMR cluster with spark and zeppelin.
when I use pyspark --packages to import jar packages, the EMR instance creates a .ivy directory in /home/hadoop. Zeppellin will creates a directory with an ID as a name in /var/lib/zeppelin/local-repo
how do I point pyspark, spark and zeppelin to use my local maven repository (/usr/local/.m2/repository) instead of create a .ivy directory and download the jars from mave central?
I know I can use pyspark --jars /local/path/to/jar.jar
to import the jar from local path and copy to .ivy directory, but I rather spark and zeppelin to use my local maven repository.
Also if I set spark.driver.extraClassPath
and spark.executor.extraClassPath
/usr/local/.m2/repository/* in spark-default.conf, will spark able to look for the jars in those directory (as the inisde directory does not contain .jar striaght away, eg /usr/local/.m2/repository/groupId/artifactId/version/name.jar)