0

我刚刚开始使用 DSE 图(之前对 Titan 有一些了解)。我已经使用 Datastax 5.0.3 设置了 DSE 图。

尝试为属性创建搜索索引时,出现以下异常。 schema.vertexLabel('Employee').index('search').search().by('story').asText().add()

org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Cannot create search index with workload: Analytics

我能够创建属性、物化和二级索引。但是当我尝试创建搜索索引时,我遇到了这个问题。

我意识到,在启动我的单节点集群时,我不得不关闭-s标志,因为这不允许我启动 DSE 服务器。第一次启动节点时出现了一些异常,我不应该-s按照一些 Datastax 开发人员 QA 设置标志。

entrypoint: ["/usr/local/bin/dse-entrypoint", "-k", "-g"]

现在,当我尝试启用该-s标志时,我的节点没有出现,并且出现以下异常。

dse          | WARN  12:54:28,038  CLibrary.java:163 - Unable to lock JVM memory (ENOMEM). This can result in part of the JVM being swapped out, especially with mmapped I/O enabled. Increase RLIMIT_MEMLOCK or run Cassandra as root.
dse          | WARN  12:54:28,038  StartupChecks.java:118 - jemalloc shared library could not be preloaded to speed up memory allocations
dse          | WARN  12:54:28,039  StartupChecks.java:150 - JMX is not enabled to receive remote connections. Please see cassandra-env.sh for more info.
dse          | WARN  12:54:28,047  SigarLibrary.java:174 - Cassandra server running in degraded mode. Is swap disabled? : false,  Address space adequate? : true,  nofile limit adequate? : true, nproc limit adequate? : true
dse          | ERROR 12:54:28,710  CassandraDaemon.java:709 - Cannot start node if snitch's data center (SearchGraphAnalytics) differs from previous data center (GraphAnalytics). Please fix the snitch configuration, decommission and rebootstrap this node or use the flag -Dcassandra.ignore_dc=true.
dse          | INFO  12:54:28,717  DseDaemon.java:556 - DSE shutting down...
dse          | INFO  12:54:28,718  PluginManager.java:104 - All plugins are stopped.
dse          | Oct 27, 2016 12:54:28 PM org.apache.coyote.http11.Http11Protocol pause
dse          | INFO: Pausing Coyote HTTP/1.1 on http-172.19.0.3-8983
dse          | Oct 27, 2016 12:54:29 PM org.apache.catalina.core.StandardService stop
dse          | INFO: Stopping service Solr
dse          | INFO  12:54:29,907  SolrHttpAuditLogFilter.java:225 - Shutting down Solr audit logging filter
dse          | INFO  12:54:29,924  RepeatablePOSTQueryFilter.java:81 - Shutting down com.datastax.bdp.search.solr.RepeatablePOSTQueryFilter filter
dse          | Oct 27, 2016 12:54:29 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
dse          | SEVERE: The web application [/solr] appears to have started a thread named [Thread-3] but has failed to stop it. This is very likely to create a memory leak.
dse          | Oct 27, 2016 12:54:29 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
dse          | SEVERE: The web application [/solr] appears to have started a thread named [NonPeriodicTasks:1] but has failed to stop it. This is very likely to create a memory leak.
dse          | Oct 27, 2016 12:54:29 PM org.apache.coyote.http11.Http11Protocol destroy
dse          | INFO: Stopping Coyote HTTP/1.1 on http-172.19.0.3-8983
dse          | INFO  12:54:33,191  MessageServer.java:129 - internode-messaging message server finished shutting down.
dse          | INFO  12:54:37,209  MessageServer.java:129 - internode-messaging message server finished shutting down.
dse          | Exception in thread "Daemon shutdown" java.lang.AssertionError
dse          |  at org.apache.cassandra.gms.Gossiper.addLocalApplicationStateInternal(Gossiper.java:1427)
dse          |  at org.apache.cassandra.gms.Gossiper.addLocalApplicationStates(Gossiper.java:1451)
dse          |  at org.apache.cassandra.gms.Gossiper.addLocalApplicationState(Gossiper.java:1441)
dse          |  at com.datastax.bdp.gms.DseState.setActiveStatusSync(DseState.java:241)
dse          |  at com.datastax.bdp.server.DseDaemon.preStop(DseDaemon.java:576)
dse          |  at com.datastax.bdp.server.DseDaemon.safeStop(DseDaemon.java:587)
dse          |  at com.datastax.bdp.server.DseDaemon.lambda$getShutdownHook$226(DseDaemon.java:905)
dse          |  at java.lang.Thread.run(Thread.java:745)

请建议我如何纠正这种情况并能够将 searchIndex 添加到我的属性中。

4

1 回答 1

1

此错误表明您正在使用与基于先前配置/启动的集群所期望的名称不同的名称启动集群。

默认情况下,除非您覆盖 cassandra.yaml 文件中的集群名称,否则您的集群将使用基于您启用的工作负载的名称启动,即 -s、-t。在您的情况下,由于您将集群作为 Analytics 集群启动,然后将其作为 SearchAnalytics 集群重新启动,因此集群名称默认为新集群名称,与旧集群名称不匹配。

这里最简单的做法是擦除 cassandra 提交日志、缓存和数据目录,然后重新启动节点。这将从您的系统表中清除旧的集群名称,并允许集群启动。这样做会清除集群中的所有数据。

于 2016-10-27T17:16:54.530 回答