All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bazaarvoice.emodb.hadoop.mapper.JsonToRowMapper Maven / Gradle / Ivy

There is a newer version: 6.2.3
Show newest version
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 pure JSON to Rows.
 */
public class JsonToRowMapper extends Mapper {

    private Row _row = new Row();

    public void map(Key key, Text json, Context context)
            throws IOException, InterruptedException {
        _row.set(json.toString());
        context.write(key, _row);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy