Changeset 32107 for other-projects/hathitrust/wcsa/extracted-features-solr/trunk/solr-ingest/scripts/_RUN.sh
- Timestamp:
- 2018-01-16T23:17:42+13:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/hathitrust/wcsa/extracted-features-solr/trunk/solr-ingest/scripts/_RUN.sh
r31184 r32107 3 3 # To work, the follow bash variables need to have been set: 4 4 # 5 # json_filelist input_dir output_dir 5 # seq_file (output_dir optional) 6 # 7 # Or: 8 # 9 # json_filelist input_dir (output_dir optional) 6 10 # 7 11 # Typically done through running a wrapper script, such as: 8 12 # 9 # RUN-PD-CLUSTER.bash13 # FULL-RUN-YARN-SPARK.sh 10 14 11 if [ "x$json_filelist" = "x" ] ; then 12 echo "_RUN.bash: Failed to set 'json_filelist'" 1>&2 13 exit 15 16 show_usage=1 17 class_mode="" 18 if [ "x$seq_file" != "x" ] ; then 19 show_usage=0 20 class_mode="seq" 21 else 22 23 24 if [ "x$json_filelist" != "x" ] ; then 25 class_mode="json" 26 fi 27 28 if [ "x$input_dir" != "x" ] ; then 29 if [ $show_usage = "json" ] ; then 30 show_usage=0 31 fi 32 fi 33 14 34 fi 15 35 16 if [ "x$input_dir" = "x" ] ; then17 echo "_RUN.bash: Failed to set ' input_dir'" 1>&218 exit 36 if [ $show_usage = "1" ] ; then 37 echo "_RUN.bash: Failed to set 'seq_file' or 'input_dir json_filelist" 1>&2 38 exit 1 19 39 fi 40 20 41 21 42 #if [ "x$output_dir" = "x" ] ; then … … 29 50 using_hdfs=0 30 51 31 if [ "x${input_dir##hdfs://*}" = "x" ] || [ "x${output_dir##hdfs://*}" = "x" ] ; then 52 if [ "$class_mode" = "seq" ] ; then 53 if [ "x${seq_file##hdfs://*}" = "x" ] || [ "x${output_dir##hdfs://*}" = "x" ] ; then 32 54 # Evidence of running command over HDFS 33 55 run_jps=1 34 56 run_jps_daemons="Spark" 35 57 using_hdfs=1 58 fi 59 fi 60 61 if [ "$class_mode" = "json" ] ; then 62 if [ "x${input_dir##hdfs://*}" = "x" ] || [ "x${output_dir##hdfs://*}" = "x" ] ; then 63 # Evidence of running command over HDFS 64 run_jps=1 65 run_jps_daemons="Spark" 66 using_hdfs=1 67 fi 36 68 fi 37 69 … … 83 115 cmd="spark-submit --class $classmain $master_opt $self_contained_jar" 84 116 85 if [ "x$solr_url" != "x" ] ; then 86 cmd="$cmd --solr-url $solr_url" 87 fi 117 if [ "$classmain" = "org.hathitrust.extractedfeatures.ProcessForSolrIngest" ] || [ "$classmain" = "org.hathitrust.extractedfeatures.ProcessForSolrIngestJSONFilelist" ] ; then 118 if [ "x$solr_base_url" != "x" ] ; then 119 cmd="$cmd --solr-base-url $solr_base_url" 120 fi 88 121 89 if [ "x$output_dir" != "x" ] ; then122 if [ "x$output_dir" != "x" ] ; then 90 123 cmd="$cmd --output-dir $output_dir" 124 fi 91 125 fi 92 126 93 127 94 cmd="$cmd --properties ef-solr.properties $input_dir $json_filelist $*" 128 if [ "$class_mode" = "seq" ] ; then 129 cmd="$cmd --properties ef-solr.properties $seq_file $*" 130 #cmd="$cmd --properties /homea/dbbridge/extracted-features-solr/solr-ingest/ef-solr.properties $seq_file $*" 131 else 132 cmd="$cmd --properties ef-solr.properties $json_filelist $input_dir $*" 133 #cmd="$cmd --properties /homea/dbbridge/extracted-features-solr/solr-ingest/ef-solr.properties $json_filelist $input_dir $*" 134 135 fi 95 136 96 137 echo "****"
Note:
See TracChangeset
for help on using the changeset viewer.