Created
December 4, 2014 09:05
-
-
Save mfirry/6324d81fba240c50a924 to your computer and use it in GitHub Desktop.
Simple example using TinkerPop3 with gremlin-scala
This file contains hidden or 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
import com.tinkerpop.gremlin.hadoop.structure.HadoopGraph | |
import com.tinkerpop.gremlin.scala._ | |
import scala.util.Random | |
import com.tinkerpop.gremlin.process.T | |
object HadoopSimpleExample extends App { | |
val graph: HadoopGraph = HadoopGraph.open() | |
val gs = GremlinScala(graph) | |
(1 to 5) foreach { i => | |
gs.addVertex().setProperty("name", s"vertex $i") | |
} | |
val traversal = gs.V.value[String]("name") | |
println(traversal.toList) | |
graph.close | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment