Database Reference
In-Depth Information
==>null
gremlin> conf.setProperty("storage.port",
"9160")
==>null
gremlin> conf.setProperty("storage.keyspace",
"twitter")
==>null
3.
Next, get an object of Titan graph:
gremlin> graph = TitanFactory.open(conf)
==>titangraph[cassandrathrift:localhost]
4.
Let's make few vertex keys and edge labels:
gremlin> graph.makeKey("fname").
dataType(String.class).indexed(Vertex.class).make()
==>fname
gremlin> graph.makeKey("lname").
dataType(String.class).indexed(Vertex.class).make()
==>lname
gremlin> graph.makeKey("twitter_tag").
dataType(String.class).indexed(Vertex.class).make()
==>twitter_tag
gremlin> graph.makeKey("tweeted_at").
dataType(String.class).indexed(Vertex.class).make()
==>tweeted_at
gremlin> graph.makeLabel("has_tweeted").make()
==>has_tweeted
gremlin> tweet.setProperty("body", "Working
on Cassandra book for apress")
==>null
gremlin> tweet.setProperty("tweeted_at",
"2014-09-21")
==>null
Here fname , lname , and twitter_tag are vertex keys and
the label has_tweeted will be used for edges in the next step.
Search WWH ::




Custom Search