You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@s2graph.apache.org by st...@apache.org on 2018/04/24 02:06:24 UTC

[14/16] incubator-s2graph git commit: add extra jar to launch spark job

add extra jar to launch spark job


Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/a3ecb57a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/a3ecb57a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/a3ecb57a

Branch: refs/heads/master
Commit: a3ecb57a6278a55bcb53e3e23b7d3b807cac8553
Parents: e4cca3b
Author: Chul Kang <el...@apache.org>
Authored: Mon Apr 23 20:36:28 2018 +0900
Committer: Chul Kang <el...@apache.org>
Committed: Mon Apr 23 20:36:28 2018 +0900

----------------------------------------------------------------------
 example/import_data.sh | 8 ++++++--
 example/prepare.sh     | 5 ++++-
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/a3ecb57a/example/import_data.sh
----------------------------------------------------------------------
diff --git a/example/import_data.sh b/example/import_data.sh
index 0cb9cd4..d2ca336 100644
--- a/example/import_data.sh
+++ b/example/import_data.sh
@@ -24,9 +24,11 @@ JOBDESC_TPL=${WORKDIR}/${SERVICE}/jobdesc.template
 JOBDESC=${WORKDIR}/${SERVICE}/jobdesc.json
 WORKING_DIR=`pwd`
 JAR=`ls ${ROOTDIR}/s2jobs/target/scala-2.11/s2jobs-assembly*.jar`
+LIB=`cd ${ROOTDIR}/target/apache-s2graph-*-incubating-bin/lib; pwd`
 
 info "WORKING_DIR : $WORKING_DIR"
 info "JAR : $JAR"
+info "LIB : $LIB"
 
 sed -e "s/\[=WORKING_DIR\]/${WORKING_DIR//\//\\/}/g" $JOBDESC_TPL | grep "^[^#]" > $JOBDESC
 
@@ -35,6 +37,8 @@ info "spark submit.."
 ${SPARK_HOME}/bin/spark-submit \
   --class org.apache.s2graph.s2jobs.JobLauncher \
   --master local[2] \
-  --driver-class-path h2-1.4.192.jar \
-  $JAR file -f $JOBDESC -n SAMPLEJOB:$SERVICE
+  --jars $LIB/h2-1.4.192.jar,$LIB/lucene-core-7.1.0.jar \
+  --driver-class-path "$LIB/h2-1.4.192.jar:$LIB/lucene-core-7.1.0.jar" \
+  --driver-java-options "-Dderby.system.home=/tmp/derby" \
+  $JAR file -f $JOBDESC -n SAMPLEJOB:$SERVICE 
 

http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/a3ecb57a/example/prepare.sh
----------------------------------------------------------------------
diff --git a/example/prepare.sh b/example/prepare.sh
index ebb78b8..9cfd804 100644
--- a/example/prepare.sh
+++ b/example/prepare.sh
@@ -22,6 +22,9 @@ status=`curl -s -o /dev/null -w "%{http_code}" "$REST"`
 if [ $status != '200' ]; then
     warn "s2graphql not running.. "
 
+    wget https://raw.githubusercontent.com/daewon/sangria-akka-http-example/master/src/main/resources/assets/graphiql.html
+    mv graphiql.html $ROOTDIR/s2graphql/src/main/resources/assets
+
     cd $ROOTDIR
     output="$(ls target/apache-s2graph-*-incubating-bin)"   
     if [ -z "$output" ]; then
@@ -31,7 +34,7 @@ if [ $status != '200' ]; then
 
     info "now we will launch s2graphql using build scripts"
     cd target/apache-s2graph-*-incubating-bin
-    ./bin/start-s2graph.sh s2graphql
+    sh ./bin/start-s2graph.sh s2graphql
 else
     info "s2graphql is running!!"
 fi