Ignore:
Timestamp:
2017-01-26T23:50:19+13:00 (7 years ago)
Author:
davidb
Message:

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

File:
1 edited

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");
Note: See TracChangeset for help on using the changeset viewer.