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

com.bazaarvoice.emodb.hadoop.mapper.RowToJsonMapper 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 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