Mer*_*moz 22 graph-databases gremlin titan rexster
我已经和Titan图形服务器玩了一段时间了.我的感觉是,尽管有大量文档,但缺乏从头开始入门教程.
我的最终目标是让一个巨人在cassandra上运行并使用StartTheShift/thunderdome进行查询.
我见过几种启动泰坦的方法:
从这个链接,我能够通过以下步骤运行titan服务器:
titan-all-0.3.0/libs到rexster-server-2.3.0/ext/titan编辑rexster-server-2.3.0/rexster.xml和添加(在a之间):
<graph>
<graph-name>geograph</graph-name>
<graph-type>com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration</graph-type>
<graph-read-only>false</graph-read-only>
<graph-location>/Users/vallette/projects/DATA/gdb</graph-location>
<properties>
<storage.backend>local</storage.backend>
<storage.directory>/Users/vallette/projects/DATA/gdb</storage.directory>
<buffer-size>100</buffer-size>
</properties>
<extensions>
<allows>
<allow>tp:gremlin</allow>
</allows>
</extensions>
</graph>
Run Code Online (Sandbox Code Playgroud)对于berkeleydb或:
<graph>
<graph-name>geograph</graph-name>
<graph-type>com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration</graph-type>
<graph-location></graph-location>
<graph-read-only>false</graph-read-only>
<properties>
<storage.backend>cassandra</storage.backend>
<storage.hostname>77.77.77.77</storage.hostname>
</properties>
<extensions>
<allows>
<allow>tp:gremlin</allow>
</allows>
</extensions>
</graph>
Run Code Online (Sandbox Code Playgroud)
对于cassandra db.
./bin/rexster.sh -s -c rexster.xmlbin/rexster-console.shg = rexster.getGraph("geograph")这种方法的问题是你通过rexster而不是gremlin连接,所以你没有自动完成.优点是您可以命名您的数据库(此处为地理位置).
./bin/titan.sh config/titan-server-rexster.xml config/titan-server-cassandra.properties创建一个名为cassandra.localwith 的文件
storage.backend=cassandrathrift
storage.hostname=127.0.0.1
Run Code Online (Sandbox Code Playgroud)开始泰坦gremlin和连接 g = TitanFactory.open("cassandra-es.local")
这很好用.
从这个链接:
./bin/titan.sh config/titan-server-rexster.xml config/titan-server-berkeleydb.properties./bin/gremlin.sh但是一旦我尝试连接到gremlin中的数据库(图形),g = TitanFactory.open('graph')它就会在我所在的目录中创建一个名为graph的新数据库.如果我执行这个目录(已填充),我得到:
无法实例化实现:com.thinkaurelius.titan.diskstorage.berkeleyje.BerkeleyJEStoreManager
有人可以澄清这些过程,并告诉我我做错了什么.谢谢
根据文档,TitanFactory.open()获取配置文件的名称或要打开或创建数据库的目录的名称.
如果史蒂文说的是真的,那么有两种方法可以使用BerkelyDB后端连接到数据库:
通过启动数据库bin/titan.sh.通过rexster控制台连接到数据库.
不要使用启动数据库bin/titan.sh.请改用gremlin控制台:TitanFactory.open("database-location").这将打开数据库.但是这没有rexster服务器.除了gremlin控制台之外,没有其他任何东西能够访问数据库.
| 归档时间: |
|
| 查看次数: |
11033 次 |
| 最近记录: |