Changeset 31374 for other-projects

Show
Ignore:
Timestamp:
31.01.2017 00:22:39 (2 years ago)
Author:
davidb
Message:

simplified command line usage

Files:
1 modified

Legend:

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

    r31372 r31374  
    3434     
    3535    protected String _input_dir; 
    36     protected String _json_list_filename; 
     36    //protected String _json_list_filename; 
    3737    protected String _whitelist_filename; 
    3838    protected String _solr_url; 
     
    4141    protected int    _verbosity; 
    4242 
    43     public ProcessForSolrIngest(String input_dir, String json_list_filename,  
     43    public ProcessForSolrIngest(String input_dir, /*String json_list_filename,*/  
    4444                                String solr_url, String output_dir, int verbosity) 
    4545    { 
    4646        _input_dir = input_dir; 
    47         _json_list_filename = (json_list_filename != null) ? json_list_filename : input_dir; 
     47        //_json_list_filename = (json_list_filename != null) ? json_list_filename : input_dir; 
    4848 
    4949        boolean use_whitelist = Boolean.getBoolean("wcsa-ef-ingest.use-whitelist"); 
     
    5858    { 
    5959        String spark_app_name = "[" + exec_mode + "] Extract Features: Process for Solr Ingest"; 
    60         spark_app_name += " [" + _json_list_filename + "]"; 
     60        //spark_app_name += " [" + _json_list_filename + "]"; 
    6161 
    6262        if (_solr_url != null) {  
     
    101101 
    102102        //String packed_sequence_path = "hdfs:///user/capitanu/data/packed-ef"; 
    103         String packed_sequence_path = _json_list_filename; 
     103        String packed_sequence_path = _input_dir; 
    104104         
    105105        JavaPairRDD<Text, Text> input_pair_rdd = jsc.sequenceFile(packed_sequence_path, Text.class, Text.class); 
     
    309309        String[] filtered_args = cmd.getArgs(); 
    310310 
    311         if (filtered_args.length != 2) { 
     311        if (filtered_args.length != 1) { 
    312312            print_usage(formatter,options); 
    313313            System.exit(1); 
     
    343343         
    344344        String input_dir  = filtered_args[0]; 
    345         String json_list_filename = filtered_args[1]; 
     345        //String json_list_filename = filtered_args[1]; 
    346346         
    347347        ProcessForSolrIngest prep_for_ingest  
    348             = new ProcessForSolrIngest(input_dir,json_list_filename,solr_url,output_dir,verbosity); 
     348            = new ProcessForSolrIngest(input_dir,/*json_list_filename,*/solr_url,output_dir,verbosity); 
    349349             
    350350        prep_for_ingest.execPerVolumeSequenceFile();