Package com.thinkaurelius.faunus

Examples of com.thinkaurelius.faunus.FaunusVertex.addEdge()


                FaunusVertex vertex = this.map.get(outId);
                if (null == vertex) {
                    vertex = new FaunusVertex(outId);
                    this.map.put(outId, vertex);
                }
                vertex.addEdge(OUT, WritableUtils.clone((FaunusEdge) value, context.getConfiguration()));
                this.counter++;

                vertex = this.map.get(inId);
                if (null == vertex) {
                    vertex = new FaunusVertex(inId);
View Full Code Here


                vertex = this.map.get(inId);
                if (null == vertex) {
                    vertex = new FaunusVertex(inId);
                    this.map.put(inId, vertex);
                }
                vertex.addEdge(IN, WritableUtils.clone((FaunusEdge) value, context.getConfiguration()));
                context.getCounter(Counters.EDGES_PROCESSED).increment(1l);
                this.counter++;
            } else {
                final long id = value.getIdAsLong();
                FaunusVertex vertex = this.map.get(id);
View Full Code Here

        vadas1.setProperty("name", "vadas");
        // EDGES
        marko1.addEdge(Direction.OUT, "worksWith", stephen1.getIdAsLong());
        stephen1.addEdge(Direction.IN, "worksWith", marko1.getIdAsLong());
        marko1.addEdge(Direction.OUT, "worksWith", vadas1.getIdAsLong());
        vadas1.addEdge(Direction.IN, "worksWith", marko1.getIdAsLong());
        stephen1.addEdge(Direction.OUT, "worksWith", vadas1.getIdAsLong());
        vadas1.addEdge(Direction.IN, "worksWith", stephen1.getIdAsLong());
        incrementalGraph.put(11l, marko1);
        incrementalGraph.put(22l, stephen1);
        incrementalGraph.put(33l, vadas1);
View Full Code Here

        marko1.addEdge(Direction.OUT, "worksWith", stephen1.getIdAsLong());
        stephen1.addEdge(Direction.IN, "worksWith", marko1.getIdAsLong());
        marko1.addEdge(Direction.OUT, "worksWith", vadas1.getIdAsLong());
        vadas1.addEdge(Direction.IN, "worksWith", marko1.getIdAsLong());
        stephen1.addEdge(Direction.OUT, "worksWith", vadas1.getIdAsLong());
        vadas1.addEdge(Direction.IN, "worksWith", stephen1.getIdAsLong());
        incrementalGraph.put(11l, marko1);
        incrementalGraph.put(22l, stephen1);
        incrementalGraph.put(33l, vadas1);
        conf = new Configuration();
        conf.set(BlueprintsGraphOutputMapReduce.FAUNUS_GRAPH_OUTPUT_BLUEPRINTS_SCRIPT_FILE, "./data/BlueprintsScript.groovy");
View Full Code Here

        vadas1.setProperty("name", "vadas");
        // EDGES
        marko1.addEdge(Direction.OUT, "created", lop1.getIdAsLong()).setProperty("since", 2009);
        marko1.addEdge(Direction.OUT, "knows", vadas1.getIdAsLong()).setProperty("since", 2008);
        lop1.addEdge(Direction.IN, "created", marko1.getIdAsLong()).setProperty("since", 2009);
        vadas1.addEdge(Direction.IN, "knows", marko1.getIdAsLong()).setProperty("since", 2008);
        incrementalGraph.put(11l, marko1);
        incrementalGraph.put(22l, lop1);
        incrementalGraph.put(33l, vadas1);
        conf = new Configuration();
        conf.set(BlueprintsGraphOutputMapReduce.FAUNUS_GRAPH_OUTPUT_BLUEPRINTS_SCRIPT_FILE, "./data/BlueprintsScript.groovy");
View Full Code Here

        assertEquals(query.hasContainers.size(), 0);
        assertEquals(query.direction, Direction.BOTH);
        assertEquals(query.labels.length, 0);
        FaunusVertex vertex = new FaunusVertex(1);
        vertex.setProperty("name", "marko");
        vertex.addEdge("knows", vertex).setProperty("time", 1);
        query.defaultFilter(vertex);
        assertEquals(vertex.getProperty("name"), "marko");
        assertEquals(vertex.getPropertyKeys().size(), 1);
        assertEquals(vertex.getVertices(Direction.OUT).iterator().next(), vertex);
        assertEquals(vertex.getEdges(Direction.OUT).iterator().next().getProperty("time"), new Integer(1));
View Full Code Here

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.