【问题标题】:what is titan-cassandra-es.properties in titan?Titan中的titan-cassandra-es.properties是什么?
【发布时间】:2015-05-18 10:57:48
【问题描述】:

titan 中的 titan-cassandra-es.properties 文件是什么?

我将 GraphOfTheGodsFactory(version 0.5.4) create 方法运行到路径 'tmp/titan' ,但未生成 titan-cassandra-es.properties 文件。

如何访问在路径 tmp/titan 中创建的图形以对其进行可视化。我试过代码

private static final String DB_PATH = "conf/titan-config.properties";          
TitanGraph g = TitanFactory.open(DB_PATH); 

然后,我在 index.jsp 中调用了这个 java 来使用 cytoscape 显示节点。 但是,我最终收到错误消息

jsp 中引发异常:后端速记未知:conf/titan-config.properties

这意味着什么?

【问题讨论】:

    标签: cassandra titan


    【解决方案1】:

    titan 中的 titan-cassandra-es.properties 文件是什么?

    这是告诉 Titan 您想要的 Titan 实例类型的配置文件。对于该特定文件,它包含配置设置以针对正在运行的 Cassandra 本地实例和正在运行的 ElasticSearch 实例启动 Titan。

    但未生成titan-cassandra-es.properties 文件

    不知道您为什么希望该文件被“生成”。如上所述,它是一个用于配置的.properties 文件。您编写.properties 文件(或使用现有文件)告诉Titan 您希望它如何设置。

    如何访问路径 tmp/titan 中创建的图形以进行可视化

    tmp/titan 不会有图表。这不是您创建/打开图表的方式。同样,您必须为open 方法提供配置.properties 文件的有效路径。

    您似乎关心使用 Cassandra 和 Elasticsearch。如前所述,您必须在本地系统上安装并运行这两个实例才能使该默认配置正常工作。如果您阅读了titan-cassandra-es.properties 文件,您可以了解如何保存自己的 ES 安装并让它在与 titan 相同的 JVM 中运行。具体来说,注释掉:

    index.search.hostname=127.0.0.1
    index.search.elasticsearch.client-only=true
    

    并取消注释:

    #index.search.directory=../db/es
    #index.search.elasticsearch.client-only=false
    #index.search.elasticsearch.local-mode=true
    

    建议将单独的 ES 实例用于生产,但由于您只想玩 Graph of the Gods,这种方法可能是可以接受的。

    【讨论】:

      猜你喜欢
      • 2014-11-27
      • 2016-01-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多