Package com.thinkaurelius.titan.core

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


        TitanTransaction dstTx = dstGraph.newTransaction();

        snapshotVertices(srcTx, dstTx);
        snapshotEdges(srcTx, dstTx);

        dstTx.commit();
        srcTx.commit();
    }

    private void snapshotVertices(TitanTransaction srcTx, TitanTransaction dstTx) {
        for (Vertex srcVertex: srcTx.getVertices()) {
View Full Code Here


                    .dataType(Integer.class)
                    .indexed(DendriteGraph.INDEX_NAME, Vertex.class)
                    .make();
        }

        tx.commit();
    }

    private void runFaunus(DendriteGraph graph, JobMetadata.Id jobId) throws Exception {
        // We do the edge counting in two passes. First, we count all the edges and write the graph to a sequence file.
        // Second, we load the graph back in filtering out all the edges. We do this because I haven't figured out a
View Full Code Here

                        .indexed(DendriteGraph.INDEX_NAME, Vertex.class)
                        .make();
            }
        }

        tx.commit();
    }

    private void run(DendriteGraph graph, JobMetadata.Id jobId, String algorithm) throws Exception {
        logger.debug("starting snap analysis of '" + graph.getId() + "'");
View Full Code Here

        } catch (Exception e) {
            tx.rollback();
            throw e;
        }

        tx.commit();
    }
}
View Full Code Here

                dstTx.makeEdgeLabel(keyVertex.getName(), definition);
            }
        }

        dstTx.commit();
        srcTx.commit();
    }

    protected abstract void copyGraph(DendriteGraph srcGraph, DendriteGraph dstGraph);

    protected TypeAttribute.Map getDefinition(TitanTypeVertex vertex) {
View Full Code Here

            } catch (Exception e) {
                dstTx.rollback();
                throw e;
            }

            dstTx.commit();
        } catch (Exception e) {
            srcTx.rollback();
            throw e;
        }
View Full Code Here

                    .dataType(FullDouble.class)
                    .indexed(DendriteGraph.INDEX_NAME, Vertex.class)
                    .make();
        }

        tx.commit();
    }

    private void run(DendriteGraph graph, JobMetadata.Id jobId, String algorithm) throws Exception {
        logger.debug("starting graphlab analysis of '" + graph.getId() + "'");
View Full Code Here

        } catch (Exception e) {
            tx.rollback();
            throw e;
        }

        tx.commit();
    }
}
View Full Code Here

            Vertex in = tx.getVertex(uidKey, i);
            Edge e = hiOutDeg.addEdge(label, in);
            e.setProperty(pKey, (int) i);
        }

        tx.commit();
    }

    public static void writeData(TitanGraph g, OutputStream data) throws IOException {
        GraphMLWriter.outputGraph(g, data);
    }
View Full Code Here

            TitanKey pk = tx.getPropertyKey(pkName);
            tx.makeLabel(getEdgeLabelName(i)).sortKey(pk).make();
        }

        tx.makeKey(UID_PROP).dataType(Long.class).indexed(Vertex.class).single().unique().make();
        tx.commit();
    }

    private String[] generateNames(String prefix, int count) {
        String[] result = new String[count];
        StringBuilder sb = new StringBuilder(8);
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.