Changeset 31247 for other-projects


Ignore:
Timestamp:
2016-12-18T20:38:59+13:00 (5 years ago)
Author:
davidb
Message:

Change sort order. Pick better output directory name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • other-projects/hathitrust/wcsa/extracted-features-solr/trunk/solr-ingest/src/main/java/org/hathitrust/extractedfeatures/ProcessForWhitelist.java

    r31246 r31247  
    105105
    106106            });
    107         JavaPairRDD<Integer, String> sorted_swapped_pair = swappedPair.sortByKey(true, 1); // 1st arg configures ascending sort, 2nd arg configures one task
     107        JavaPairRDD<Integer, String> sorted_swapped_pair = swappedPair.sortByKey(false,1);
    108108
    109109        JavaPairRDD<String, Integer> sorted_swaped_back_pair = sorted_swapped_pair.mapToPair(new PairFunction<Tuple2<Integer, String>, String, Integer>() {
     
    126126       
    127127        //sorted_counts.saveAsTextFile(_json_list_filename + ".out");
    128 
    129         sorted_swaped_back_pair.saveAsTextFile(_json_list_filename + ".out");
     128        String output_directory = _json_list_filename.replaceAll("\\.txt$","-out");
     129        sorted_swaped_back_pair.saveAsTextFile(output_directory);
    130130
    131131       
Note: See TracChangeset for help on using the changeset viewer.