【问题标题】:DSE Schema Creation: node workload is not compatibleDSE 模式创建:节点工作负载不兼容
【发布时间】:2019-05-02 17:40:21
【问题描述】:

我目前正在尝试为特定节点创建图形模式以对其进行查询。我尝试按照here 显示的示例进行操作,但遇到了标题中所述的错误。

已创建属性键

schema.propertyKey('id').Text().ifNotExists().create()
schema.propertyKey('name').Text().ifNotExists().create()
schema.propertyKey('age').Int().ifNotExists().create()
schema.propertyKey('location').Point().withGeoBounds().ifNotExists().create()
schema.propertyKey('gender').Text().ifNotExists().create()
schema.propertyKey('dob').Timestamp().ifNotExists().create()

使用的架构是

schema.vertexLabel("people_node").index("search").by("name").asText().by("gender").by("location").by("dob").ifNotExists().add()
schema.vertexLabel("people_node").index("people_node_index").materialized().by("id").ifNotExists().add()
schema.vertexLabel("people_node").index("people_node_index")secondary().by("age").ifNotExists().add()

示例数据

id, name , age, location      , gender  , dob
0,  Betsy, 15 , POINT(10 15)  , F       , 1997-09-21T12:55:54+0400

遇到错误

java.lang.IllegalArgumentException: Cannot create search index, node workdload is not compatible

任何有关解决此问题的建议将不胜感激。

【问题讨论】:

    标签: datastax datastax-enterprise


    【解决方案1】:

    您需要在启用 DSE 搜索的情况下启动 DSE。根据安装方法,它可能是:

    • 对于 tarball 安装 - 将 -s 标志传递给 dse cassandra 命令
    • 对于软件包安装 - 在 /etc/default/dse 文件中设置 SOLR_ENABLED=1 并重新启动服务

    【讨论】:

    • 我已经使用 OpsCenter 安装了它。集群中有 2 个包含 DSE Search + DSE Graph 的节点和 1 个包含 Cassandra + DSE Graph 的节点。使用图形加载器将顶点摄取到包含 Cassandra 的节点,从那里我尝试运行上面的代码。我假设应该启用搜索,因为我的集群有包含 DSE 搜索的节点? @亚历克斯·奥特
    • 在同一个数据中心内,所有节点都应该有相同的工作负载 - 所以所有节点都应该启用 DSE Search + Graph(Cassandra 始终启用)
    • 感谢您的快速回复。只是为了澄清,假设我有 3 个节点。这是否意味着所有 3 个节点都必须启用 dse search + graph,而我只能在 1 个节点上启用 cassandra?最后,我想问一下我是否仅在 1 个节点上启用了 cassandra,我摄取的所有数据是否仅存储到该单个节点中?此外,来自多个数据中心的重叠功能(为多个数据中心启用的图形,例如 cassandra 和 dse 搜索)是否有任何不利影响? @亚历克斯·奥特
    • Cassandra 在 DSE 中始终处于启用状态 - 它是保存所有数据的基本块。除此之外,您还可以启用其他选项,例如 DSE 搜索、图表、分析。它们可以按整个集群或每个数据中心启用。但是在数据中心内部,工作量应该总是一样的。在您的情况下,如果您启用 DSE Search & Graph,所有节点下面也有 Cassandra,并存储数据。您可以在多个 DC 中启用 Graph 和 Search 实例,但这应该通过 Gremlin 创建图形时设置复制设置来完成
    • 我不确定 OpsCenter - 也许它没有正确配置接口?
    猜你喜欢
    • 1970-01-01
    • 2018-04-03
    • 1970-01-01
    • 2017-01-27
    • 2021-05-03
    • 2015-04-04
    • 2019-10-30
    • 2020-09-24
    相关资源
    最近更新 更多