From db300616d374c1eb0dde8a24494c7ce2aeb85545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Rold=C3=A1n?= Date: Fri, 14 Dec 2018 16:39:59 +0000 Subject: [PATCH] spark: allows notebooks to be saved #13 There is a problem when you set a new conf folder for pyspark beyond the one by default (this is one located in $SPARK_HOME). The problem is that you can use the loaded jars with the build notebooks, but you can't acces the jars from the oskar-spark notebooks. Furthermore, when you apply "maven install", the build notebooks get erased. So I had to edit oskar-app/pom in order to replace those notebooks at "oskar-spark" before we erase everything in the build folder. --- oskar-app/app/pyoskar/pyoskar-nb.sh | 2 +- oskar-app/pom.xml | 38 ++++++++++++++++------------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/oskar-app/app/pyoskar/pyoskar-nb.sh b/oskar-app/app/pyoskar/pyoskar-nb.sh index c5abe09..efd8478 100755 --- a/oskar-app/app/pyoskar/pyoskar-nb.sh +++ b/oskar-app/app/pyoskar/pyoskar-nb.sh @@ -5,7 +5,7 @@ export PYSPARK_DRIVER_PYTHON_OPTS='lab' export SPARK_CONF_DIR='../conf' if [[ -z "$SPARK_HOME" ]]; then - '~/soft/spark-2.4.0-bin-hadoop2.7/bin/pyspark' + ~/soft/spark-2.4.0-bin-hadoop2.7/bin/pyspark else $SPARK_HOME/bin/pyspark fi diff --git a/oskar-app/pom.xml b/oskar-app/pom.xml index 139d632..e8d5eaa 100644 --- a/oskar-app/pom.xml +++ b/oskar-app/pom.xml @@ -82,27 +82,31 @@ maven-antrun-plugin 1.8 - - clean-libs - clean - - - Preparing ${build.dir} folder - - - - - - - - run - - install-app install + + Removing notebooks from ${build.dir}/../oskar-spark + + + + + + + + + Copying notebooks to ${build.dir}/../oskar-spark + + + + + + + + + Preparing ${build.dir} folder @@ -121,7 +125,7 @@ - +