com.bazaarvoice.emodb.hadoop.mapper.RowToJsonMapper Maven / Gradle / Ivy
package com.bazaarvoice.emodb.hadoop.mapper;
import com.bazaarvoice.emodb.hadoop.io.Row;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;
import java.io.IOException;
/**
* Simple mapper to convert Rows back to JSON.
*/
public class RowToJsonMapper extends Mapper {
private Text _json = new Text();
public void map(K key, Row row, Context context)
throws IOException, InterruptedException {
_json.set(row.getJson());
context.write(key, _json);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy