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

com.tinkerpop.gremlin.giraph.structure.io.graphson.GraphSONOutputFormat Maven / Gradle / Ivy

package com.tinkerpop.gremlin.giraph.structure.io.graphson;

import com.tinkerpop.gremlin.giraph.structure.util.GiraphInternalVertex;
import com.tinkerpop.gremlin.giraph.structure.io.CommonOutputFormat;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.mapreduce.RecordWriter;
import org.apache.hadoop.mapreduce.TaskAttemptContext;

import java.io.DataOutputStream;
import java.io.IOException;

/**
 * @author Joshua Shinavier (http://fortytwo.net)
 */
public class GraphSONOutputFormat extends CommonOutputFormat {

    @Override
    public RecordWriter getRecordWriter(final TaskAttemptContext job) throws IOException, InterruptedException {
        return new GraphSONRecordWriter(getDataOuputStream(job));
    }

    public RecordWriter getRecordWriter(final TaskAttemptContext job,
                                                                            final DataOutputStream outputStream) throws IOException, InterruptedException {
        return new GraphSONRecordWriter(outputStream);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy