#!/bin/bash # To work, the follow bash variables need to have been set: # # json_filelist input_dir output_dir # # Typically done through running a wrapper script, such as: # # RUN-PD-CLUSTER.bash if [ "x$json_filelist" = "x" ] ; then echo "_RUN.bash: Failed to set 'json_filelist'" 1>2 exit fi if [ "x$input_dir" = "x" ] ; then echo "_RUN.bash: Failed to set 'input_dir'" 1>2 exit fi if [ "x$output_dir" = "x" ] ; then echo "_RUN.bash: Failed to set 'output_dir'" 1>2 exit fi self_contained_jar=target/htrc-ef-ingest-0.9-jar-with-dependencies.jar base_cmd="spark-submit --class org.hathitrust.PrepareForIngest $master_opt $self_contained_jar" $base_cmd --json-filelist="$json_filelist" "$input_dir" "$output_dir" $* # spark-submit --class org.hathitrust.PrepareForIngest --master local[4] target/htrc-ef-ingest-0.9-jar-with-dependencies.jar --json-filelist=pd-file-listing-step10000.txt pd-ef-json-files pd-solr-json-files $* # spark-submit --class org.hathitrust.PrepareForIngest --master local[4] target\htrc-ef-ingest-0.9-jar-with-dependencies.jar --json-filelist=pd-file-listing-step1000.txt json-files solr-files $*