Ignore:
Timestamp:
10/28/16 14:35:52 (4 years ago)
Author:
davidb
Message:

Only have RDD if an output directory was specified on the command-line when run

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/hathitrust/solr-extracted-features/trunk/src/main/java/org/hathitrust/PrepareForIngest.java

    r30976 r30977  
    5454        System.out.println("");
    5555
    56         String rdd_save_file = "rdd-solr-json-page-files";
    57         json_ids.saveAsTextFile(rdd_save_file);
    58         System.out.println("############");
    59         System.out.println("# Saved RDD of Solr JSON page files, top-level, as:");
    60         System.out.println("#  " + rdd_save_file);
    61         System.out.println("############");
    62         System.out.println("");
     56        if (_output_dir != null) {
     57            String rdd_save_file = "rdd-solr-json-page-files";
     58            json_ids.saveAsTextFile(rdd_save_file);
     59            System.out.println("############");
     60            System.out.println("# Saved RDD of Solr JSON page files, top-level, as:");
     61            System.out.println("#  " + rdd_save_file);
     62            System.out.println("############");
     63            System.out.println("");
     64        }
    6365       
    6466        jsc.close();
Note: See TracChangeset for help on using the changeset viewer.