Ignore:
Timestamp:
2016-10-25T14:49:36+13:00 (8 years ago)
Author:
davidb
Message:

More flexible command-line args

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/hathitrust/solr-extracted-features/trunk/RUN.bash

    r30912 r30918  
    11#!/bin/bash
    22
    3 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-files $*
     3input_dir=pd-ef-json-files
     4output_dir=pd-solr-json-files
     5
     6master_opt="--master local[4]"
     7self_contained_jar=target/htrc-ef-ingest-0.9-jar-with-dependencies.jar
     8base_cmd="spark-submit --class org.hathitrust.PrepareForIngest $master_opt $self_contained_jar"
     9
     10if [ $# -ge 1 ] ; then
     11    file_listing=shift $*
     12    $base_cmd --json-filelist="$file_listing" $input_dir $output_dir $*
     13else
     14    echo "****"
     15    echo "* Processing all files in: $input_dir"
     16    echo "****"
     17    $base_cmd $input_dir $output_dir $*
     18fi
     19
     20#    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 $*
    421
    522# 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 $*
Note: See TracChangeset for help on using the changeset viewer.