Changeset 31360 for other-projects

Show
Ignore:
Timestamp:
26.01.2017 23:50:19 (22 months ago)
Author:
davidb
Message:

Seems to be Text class not a String class coming out of the seuquenceFiles

Files:
1 modified

Legend:

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

    r31359 r31360  
    22 
    33import java.io.IOException; 
     4 
     5import org.apache.hadoop.io.Text; 
    46import org.apache.spark.api.java.function.Function; 
    57import org.json.JSONObject; 
    68 
    7 class PerVolumeCatalogLangSequenceFileMap implements Function<String, String> 
     9class PerVolumeCatalogLangSequenceFileMap implements Function<Text, String> 
    810{ 
    911    private static final long serialVersionUID = 1L; 
     
    2224    } 
    2325     
    24     public String call(String json_text) throws IOException 
     26    public String call(Text json_text) throws IOException 
    2527    { 
    2628        String catalog_lang = null; 
    2729          
    2830        try { 
    29             JSONObject extracted_feature_record  = new JSONObject(json_text); 
     31            JSONObject extracted_feature_record  = new JSONObject(json_text.toString()); 
    3032 
    3133            String volume_id = extracted_feature_record.getString("id");