Package com.tinkerpop.gremlin.giraph.structure.io.graphson

Source Code of com.tinkerpop.gremlin.giraph.structure.io.graphson.GraphSONVertexOutputFormat

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

import org.apache.giraph.io.VertexOutputFormat;
import org.apache.giraph.io.VertexWriter;
import org.apache.hadoop.mapred.FileOutputCommitter;
import org.apache.hadoop.mapreduce.JobContext;
import org.apache.hadoop.mapreduce.OutputCommitter;
import org.apache.hadoop.mapreduce.TaskAttemptContext;

import java.io.IOException;

/**
* @author Joshua Shinavier (http://fortytwo.net)
*/
public class GraphSONVertexOutputFormat extends VertexOutputFormat {
    @Override
    public VertexWriter createVertexWriter(TaskAttemptContext context) throws IOException, InterruptedException {
        return new GraphSONVertexWriter();
    }

    @Override
    public void checkOutputSpecs(JobContext context) throws IOException, InterruptedException {
    }

    @Override
    public OutputCommitter getOutputCommitter(TaskAttemptContext context) throws IOException, InterruptedException {
        return new FileOutputCommitter();
    }
}
TOP

Related Classes of com.tinkerpop.gremlin.giraph.structure.io.graphson.GraphSONVertexOutputFormat

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.