Package com.thinkaurelius.titan.core

Examples of com.thinkaurelius.titan.core.TitanTransaction.addVertex()


        g.commit();

        TitanTransaction tx = g.newTransaction();
        // Add a vertex that has an out edge to every other vertex
        Vertex hiOutDeg = tx.addVertex(Schema.SUPERNODE_UID);
        String label = schema.getSupernodeOutLabel();
        TitanKey uidKey = tx.getPropertyKey(Schema.UID_PROP);
        hiOutDeg.setProperty(Schema.UID_PROP, Schema.SUPERNODE_UID);
        String pKey = schema.getSortKeyForLabel(label);
        for (long i = INITIAL_VERTEX_UID; i < schema.getVertexCount(); i++) {
View Full Code Here


            }
            for (int t = 0; t < 1000; t++) {
                graph.addVertex(null);
                graph.rollback();
                TitanTransaction tx = graph.newTransaction();
                tx.addVertex();
                tx.rollback();
            }
            if (r == 1 || r == (numRuns - 1)) {
                memoryBaseline = MemoryAssess.getMemoryUse();
                stats.addValue(memoryBaseline);
View Full Code Here

                public void run() {
                    for (int r = 0; r < rounds; r++) {
                        TitanTransaction tx = graph.newTransaction();
                        TitanVertex previous = null;
                        for (int c = 0; c < commitSize; c++) {
                            TitanVertex v = tx.addVertex();
                            long uid = uidCounter.incrementAndGet();
                            v.setProperty("uid", uid);
                            v.setProperty("name", "user" + uid);
                            if (previous != null) {
                                v.addEdge("friend", previous).setProperty("time", Math.abs(random.nextInt()));
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.