How to start Titan graph server and connect with gremlin?

谁说我不能喝 提交于 2019-11-30 03:08:21

According to the documentation TitanFactory.open() takes either the name of a config file or the name of a directory to open or create a database in.

If what steven says is true, there would be two ways to connect to the database with a BerkelyDB backend:

  1. Start the database through bin/titan.sh. Connect to the database through the rexster console.

  2. DON'T start the database using bin/titan.sh. Use the gremlin console instead: TitanFactory.open("database-location"). This will open the database. But this does not have a rexster server. Nothing else will be able to access the database but the gremlin console.

With Titan Server/BerkeleyDB, you should attempt to connect via RexPro or REST (Thunderdome should connect over REST). You can't open another Titan-based connection to BerkeleyDB as Titan Server already owns that.

This is different than Titan Server/Cassandra where connectivity occurs over RexPro or REST, but also through embedded Cassandra which enables connectivity over thrift via TitanFactory.open('graph')

It's also possible to access Titan from python using these two libraries:

https://github.com/StartTheShift/thunderdome

and

https://github.com/espeed/bulbs.

Thunderdome is currently Titan-specific, and bulbs is generic. A (possibly biased) comparison between Thunderdome and Bulbs is given on Thunderdome's wiki: https://github.com/StartTheShift/thunderdome/wiki/Bulbs-VS-thunderdome

If you need autocompletion, you can use iPython and enable autocompletion in your iPython config.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!