首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用titan 0.5.4和berkeleyje的rexster.xml配置

使用titan 0.5.4和berkeleyje的rexster.xml配置
EN

Stack Overflow用户
提问于 2016-02-08 00:58:31
回答 1查看 175关注 0票数 0

我是graph的新手,几天来我完全迷失了方向。我正在尝试运行rexster与泰坦数据库0.5.4与berkeleyje存储后端。但我不确定rexster.xml配置是否正确。

如果我遵循rexster docs,我得到的是没有顶点或边的空数据库,而实际上有顶点或边。screenshot

代码语言:javascript
复制
  <graphs>
    <graph>
      <graph-name>bio4j</graph-name>
      <graph-type>com.tinkerpop.rexster.config.TinkerGraphGraphConfiguration</graph-type>
      <graph-location>/Users/Phoenix/Dropbox/Graph4Bio/Bio4j/bio4j/importGOTitanProperties.properties</graph-location>
      <graph-read-only>false</graph-read-only>
      <extensions>
        <allows>
          <allow>tp:frames</allow>
        </allows>
      </extensions>
    </graph>
    ...
  </graphs>

如果我按照答案here

代码语言:javascript
复制
  <graphs>
    <graph>
      <graph-name>bio4j</graph-name>
      <graph-type>com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration</graph-type>

      <graph-location>/Users/Phoenix/Dropbox/Graph4Bio/Bio4j/bio4j/importGOTitanProperties.properties</graph-location>
      <graph-read-only>false</graph-read-only>
      <properties>
        <storage.backend>local</storage.backend>
        <storage.directory>/Users/Phoenix/Dropbox/Graph4Bio/Bio4j/bio4j</storage.directory>
        <buffer-size>100</buffer-size>
      </properties>
      <extensions>
        <allows>
          <allow>tp:frames</allow>
        </allows>
      </extensions>
    </graph>
    ...
  </graphs>

我得到了以下错误:

代码语言:javascript
复制
$ ../../bin/rexster.sh --start
0    [main] INFO  com.tinkerpop.rexster.Application  - .:Welcome to Rexster:.
90   [main] INFO  com.tinkerpop.rexster.server.RexsterProperties  - Using [/Users/Phoenix/Dropbox/Graph4Bio/Titan/rexhome/config/rexster.xml] as configuration source.
97   [main] INFO  com.tinkerpop.rexster.Application  - Rexster is watching [/Users/Phoenix/Dropbox/Graph4Bio/Titan/rexhome/config/rexster.xml] for change.
232  [main] WARN  com.tinkerpop.rexster.config.GraphConfigurationContainer  - Could not load graph bio4j. Please check the XML configuration.
233  [main] WARN  com.tinkerpop.rexster.config.GraphConfigurationContainer  - GraphConfiguration could not be found or otherwise instantiated: [com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration]. Ensure that it is in Rexster's path.
com.tinkerpop.rexster.config.GraphConfigurationException: GraphConfiguration could not be found or otherwise instantiated: [com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration]. Ensure that it is in Rexster's path.
    at com.tinkerpop.rexster.config.GraphConfigurationContainer.getGraphFromConfiguration(GraphConfigurationContainer.java:142)
    at com.tinkerpop.rexster.config.GraphConfigurationContainer.<init>(GraphConfigurationContainer.java:54)
    at com.tinkerpop.rexster.server.XmlRexsterApplication.reconfigure(XmlRexsterApplication.java:99)
    at com.tinkerpop.rexster.server.XmlRexsterApplication.<init>(XmlRexsterApplication.java:47)
    at com.tinkerpop.rexster.Application.<init>(Application.java:97)
    at com.tinkerpop.rexster.Application.main(Application.java:189)
Caused by: java.lang.IllegalArgumentException: Could not find implementation class: local
    at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:47)
    at com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:421)
    at com.thinkaurelius.titan.diskstorage.Backend.getStorageManager(Backend.java:361)
    at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1275)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:93)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:73)
    at com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration.configureGraphInstance(TitanGraphConfiguration.java:33)
    at com.tinkerpop.rexster.config.GraphConfigurationContainer.getGraphFromConfiguration(GraphConfigurationContainer.java:124)
    ... 5 more
Caused by: java.lang.ClassNotFoundException: local
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:42)
    ... 12 more
235  [main] WARN  com.tinkerpop.rexster.config.GraphConfigurationContainer  - Could not find implementation class: local
java.lang.IllegalArgumentException: Could not find implementation class: local
    at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:47)
    at com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:421)
    at com.thinkaurelius.titan.diskstorage.Backend.getStorageManager(Backend.java:361)
    at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1275)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:93)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:73)
    at com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration.configureGraphInstance(TitanGraphConfiguration.java:33)
    at com.tinkerpop.rexster.config.GraphConfigurationContainer.getGraphFromConfiguration(GraphConfigurationContainer.java:124)
    at com.tinkerpop.rexster.config.GraphConfigurationContainer.<init>(GraphConfigurationContainer.java:54)
    at com.tinkerpop.rexster.server.XmlRexsterApplication.reconfigure(XmlRexsterApplication.java:99)
    at com.tinkerpop.rexster.server.XmlRexsterApplication.<init>(XmlRexsterApplication.java:47)
    at com.tinkerpop.rexster.Application.<init>(Application.java:97)
    at com.tinkerpop.rexster.Application.main(Application.java:189)
Caused by: java.lang.ClassNotFoundException: local
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:42)
    ... 12 more
244  [main] INFO  com.tinkerpop.rexster.server.metrics.HttpReporterConfig  - Configured HTTP Metric Reporter.
245  [main] INFO  com.tinkerpop.rexster.server.metrics.ConsoleReporterConfig  - Configured Console Metric Reporter.
1312 [main] INFO  com.tinkerpop.rexster.server.HttpRexsterServer  - HTTP/REST thread pool configuration: kernal[4 / 4] worker[8 / 8] 
1313 [main] INFO  com.tinkerpop.rexster.server.HttpRexsterServer  - Using org.glassfish.grizzly.strategies.LeaderFollowerNIOStrategy IOStrategy for HTTP/REST.
1399 [main] INFO  com.tinkerpop.rexster.server.HttpRexsterServer  - Rexster Server running on: [http://localhost:8182]
1399 [main] INFO  com.tinkerpop.rexster.server.RexProRexsterServer  - Using org.glassfish.grizzly.strategies.LeaderFollowerNIOStrategy IOStrategy for RexPro.
1399 [main] INFO  com.tinkerpop.rexster.server.RexProRexsterServer  - RexPro thread pool configuration: kernal[4 / 4] worker[8 / 8] 
1402 [main] INFO  com.tinkerpop.rexster.server.RexProRexsterServer  - Rexster configured with [DefaultSecurity].
1403 [main] INFO  com.tinkerpop.rexster.server.RexProRexsterServer  - RexPro Server bound to [0.0.0.0:8184]
1412 [main] INFO  com.tinkerpop.rexster.server.ShutdownManager  - Bound shutdown socket to /127.0.0.1:8183. Starting listener thread for shutdown requests.

下面是db .properties文件:

代码语言:javascript
复制
$ nano importGOTitanProperties.properties
#ImportGOTitan properties
storage.directory=bio4j
storage.backend=berkeleyje
#index.search.backend=elasticsearch
#index.search.directory=bio4j/es
storage.batch-loading=false
storage.transactions=true
query.fast-property=false
schema.default=none
EN

回答 1

Stack Overflow用户

发布于 2016-02-08 14:47:59

在阅读了this之后,我可以知道如何配置rexster.xml文件

rexster.xml:

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>
<rexster>
  ...
  <graphs>
    <graph>
      <graph-name>bio4j</graph-name>
      <graph-type>com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration</graph-type>
      <graph-read-only>false</graph-read-only>
      <properties>
        <storage.backend>berkeleyje</storage.backend>
        <storage.directory>/Users/Phoenix/Dropbox/Graph4Bio/Bio4j/bio4j</storage.directory>
        <storage.buffer-size>100</storage.buffer-size>
      </properties>
      <extensions>
        <allows>
          <allow>tp:gremlin</allow>
        </allows>
      </extensions>
    </graph>
  </graphs>
</rexster>

启动服务器:

代码语言:javascript
复制
$ ../../bin/rexster.sh --start
0    [main] INFO  com.tinkerpop.rexster.Application  - .:Welcome to Rexster:.
115  [main] INFO  com.tinkerpop.rexster.server.RexsterProperties  - Using [/Users/Phoenix/Dropbox/Graph4Bio/Titan/rexhome/config/rexster.xml] as configuration source.
129  [main] INFO  com.tinkerpop.rexster.Application  - Rexster is watching [/Users/Phoenix/Dropbox/Graph4Bio/Titan/rexhome/config/rexster.xml] for change.
942  [main] INFO  com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration  - Generated unique-instance-id=0a2581025086-AngryMac-local1
1049 [main] INFO  com.thinkaurelius.titan.diskstorage.Backend  - Initiated backend operations thread pool of size 8
1161 [main] INFO  com.thinkaurelius.titan.diskstorage.log.kcvs.KCVSLog  - Loaded unidentified ReadMarker start time Timepoint[1454913673816000 μs] into com.thinkaurelius.titan.diskstorage.log.kcvs.KCVSLog$MessagePuller@302c971f
1165 [main] INFO  com.tinkerpop.rexster.RexsterApplicationGraph  - Graph [bio4j] - configured with allowable namespace [tp:gremlin]
1205 [main] INFO  com.tinkerpop.rexster.config.GraphConfigurationContainer  - Graph bio4j - titangraph[berkeleyje:/Users/Phoenix/Dropbox/Graph4Bio/Bio4j/bio4j] loaded
2502 [main] INFO  com.tinkerpop.rexster.server.HttpRexsterServer  - HTTP/REST thread pool configuration: kernal[4 / 4] worker[8 / 8]
2504 [main] INFO  com.tinkerpop.rexster.server.HttpRexsterServer  - Using org.glassfish.grizzly.strategies.LeaderFollowerNIOStrategy IOStrategy for HTTP/REST.
2636 [main] INFO  com.tinkerpop.rexster.server.HttpRexsterServer  - Rexster Server running on: [http://localhost:8182]
2636 [main] INFO  com.tinkerpop.rexster.server.RexProRexsterServer  - Using org.glassfish.grizzly.strategies.LeaderFollowerNIOStrategy IOStrategy for RexPro.
2636 [main] INFO  com.tinkerpop.rexster.server.RexProRexsterServer  - RexPro thread pool configuration: kernal[4 / 4] worker[8 / 8]
2640 [main] INFO  com.tinkerpop.rexster.server.RexProRexsterServer  - Rexster configured with no security.
2641 [main] INFO  com.tinkerpop.rexster.server.RexProRexsterServer  - RexPro Server bound to [0.0.0.0:8184]
2653 [main] INFO  com.tinkerpop.rexster.server.ShutdownManager  - Bound shutdown socket to /127.0.0.1:8183. Starting listener thread for shutdown requests.

狗屋screenshot:)

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35256328

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档