Package com.thinkaurelius.faunus.mapreduce.util

Examples of com.thinkaurelius.faunus.mapreduce.util.EmptyConfiguration


        VERTICES_PROCESSED,
        EDGES_PROCESSED
    }

    public static Configuration createConfiguration(final Class<? extends Element> klass, final String closure) {
        final Configuration configuration = new EmptyConfiguration();
        configuration.setClass(CLASS, klass, Element.class);
        configuration.set(CLOSURE, closure);
        return configuration;
    }
View Full Code Here


public class ScriptRecordReaderTest extends BaseTest {

    public void testRecordReader() throws Exception {
        final Configuration conf = new Configuration();
        conf.setStrings(ScriptInputFormat.FAUNUS_GRAPH_INPUT_SCRIPT_FILE, ScriptRecordReaderTest.class.getResource("ScriptInput.groovy").getFile());
        ScriptRecordReader reader = new ScriptRecordReader(VertexQueryFilter.create(new EmptyConfiguration()), new TaskAttemptContext(conf, new TaskAttemptID()));
        reader.initialize(new FileSplit(new Path(ScriptRecordReaderTest.class.getResource("graph-of-the-gods.id").toURI()), 0, Long.MAX_VALUE, new String[]{}),
                new TaskAttemptContext(conf, new TaskAttemptID()));
        int counter = 0;
        while (reader.nextKeyValue()) {
            assertEquals(reader.getCurrentKey(), NullWritable.get());
View Full Code Here

* @author Marko A. Rodriguez (http://markorodriguez.com)
*/
public class GraphSONRecordReaderTest extends BaseTest {

    public void testRecordReader() throws Exception {
        GraphSONRecordReader reader = new GraphSONRecordReader(VertexQueryFilter.create(new EmptyConfiguration()));
        reader.initialize(new FileSplit(new Path(GraphSONRecordReaderTest.class.getResource("graph-of-the-gods.json").toURI()), 0, Long.MAX_VALUE, new String[]{}),
                new TaskAttemptContext(new Configuration(), new TaskAttemptID()));
        int counter = 0;
        Map<Long, FaunusVertex> graph = new HashMap<Long, FaunusVertex>();
        while (reader.nextKeyValue()) {
View Full Code Here

TOP

Related Classes of com.thinkaurelius.faunus.mapreduce.util.EmptyConfiguration

Copyright © 2018 www.massapicom. 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.