This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wget https://snap.stanford.edu/data/email-Enron.txt.gz | |
gunzip email-Enron.txt.gz | |
bin/gremlin.sh #and then :load enron.groovy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:load ml.groovy | |
MovieLensParser.load(graph, "ml-1m") | |
g = graph.traversal() | |
clockWithResult(1){ g.E().count().tryNext().get() } | |
clockWithResult(1){ g.V().count().tryNext().get() } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Configure and open an in-memory titan-tupl graph | |
conf = new BaseConfiguration() | |
conf.setProperty("storage.backend", "jp.classmethod.titan.diskstorage.tupl.TuplStoreManager") | |
g = com.thinkaurelius.titan.core.TitanFactory.open(conf) | |
//Create the vertices | |
titan = g.addVertex("name", "Titan") | |
structure = g.addVertex("name", "Gremlin Structure") | |
graphtraversal = g.addVertex("name", "GraphTraversal") | |
gremlin = g.addVertex("name", "Gremlin") |