Titan 加载弹性搜索问题

2024-04-18

我使用以下代码来加载泰坦:

TitanFactory.Builder config = TitanFactory.build();
    config.set("storage.backend", "berkeleyje");
    config.set("storage.directory", DIRECTORY);
    //config.set("storage.conf-file", "file:////" + DIRECTORY + "/cassandra/cassandra.yaml");
    config.set("index." + INDEX_NAME + ".backend", "elasticsearch");
    config.set("index." + INDEX_NAME + ".DIRECTORY", DIRECTORY + File.separator + "es");
    config.set("index." + INDEX_NAME + ".elasticsearch.local-mode", true);
    config.set("index." + INDEX_NAME + ".elasticsearch.client-only", false);

    graph = config.open();

使用 gradle 加载依赖项:

compile group: 'com.thinkaurelius.titan', name: 'titan-all', version: '1.0.0'

我的项目目录是:

/home/ray/IdeaProjects/BAG - 图数据库的拜占庭容错架构/

我的泰坦位于该项目目录的“TITAN”文件夹中 这就是我在 Directory 变量中设置的内容。

仍然启动它总是崩溃:

22:56:01.420 [main] DEBUG c.t.t.d.b.BerkeleyJEStoreManager - Opened database system_properties
java.lang.Throwable: null
    at com.thinkaurelius.titan.diskstorage.berkeleyje.BerkeleyJEStoreManager.openDatabase(BerkeleyJEStoreManager.java:172) [titan-berkeleyje-1.0.0.jar:na]
    at com.thinkaurelius.titan.diskstorage.berkeleyje.BerkeleyJEStoreManager.openDatabase(BerkeleyJEStoreManager.java:34) [titan-berkeleyje-1.0.0.jar:na]
    at com.thinkaurelius.titan.diskstorage.keycolumnvalue.keyvalue.OrderedKeyValueStoreManagerAdapter.openDatabase(OrderedKeyValueStoreManagerAdapter.java:76) [titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.diskstorage.keycolumnvalue.keyvalue.OrderedKeyValueStoreManagerAdapter.openDatabase(OrderedKeyValueStoreManagerAdapter.java:69) [titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.diskstorage.keycolumnvalue.keyvalue.OrderedKeyValueStoreManagerAdapter.openDatabase(OrderedKeyValueStoreManagerAdapter.java:25) [titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.diskstorage.Backend.getStandaloneGlobalConfiguration(Backend.java:449) [titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1322) [titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94) [titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:84) [titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.core.TitanFactory$Builder.open(TitanFactory.java:139) [titan-core-1.0.0.jar:na]
    at main.java.com.bag.server.database.TitanDatabaseAccess.start(TitanDatabaseAccess.java:56) [main/:na]
    at main.java.com.bag.server.TestServer.<init>(TestServer.java:105) [main/:na]
    at main.java.com.bag.server.TestServer.main(TestServer.java:428) [main/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_112]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_112]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_112]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_112]
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na]
22:56:01.423 [main] DEBUG c.t.t.d.k.k.OrderedKeyValueStoreAdapter - Used key length 0 for database system_properties
22:56:01.429 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader$LoaderConfiguration - Option loading enabled by default
22:56:01.431 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Added preferred classloader to config option loader chain: sun.misc.Launcher$AppClassLoader@63e31ee
22:56:01.431 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Added thread context classloader to config option loader chain: sun.misc.Launcher$AppClassLoader@63e31ee
22:56:01.431 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Added caller classloader to config option loader chain: sun.misc.Launcher$AppClassLoader@63e31ee
22:56:01.442 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Loaded class com.thinkaurelius.titan.diskstorage.hbase.HBaseStoreManager with loader sun.misc.Launcher$AppClassLoader@63e31ee
22:56:01.442 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Located functioning classloader sun.misc.Launcher$AppClassLoader@63e31ee; using it for remaining classload attempts
22:56:01.447 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Loaded class com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager with selected loader sun.misc.Launcher$AppClassLoader@63e31ee
22:56:01.447 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Loaded class com.thinkaurelius.titan.diskstorage.cassandra.AbstractCassandraStoreManager with selected loader sun.misc.Launcher$AppClassLoader@63e31ee
22:56:01.452 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Loaded class com.thinkaurelius.titan.diskstorage.cassandra.thrift.CassandraThriftStoreManager with selected loader sun.misc.Launcher$AppClassLoader@63e31ee
22:56:01.459 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Loaded class com.thinkaurelius.titan.diskstorage.es.ElasticSearchIndex with selected loader sun.misc.Launcher$AppClassLoader@63e31ee
22:56:01.460 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Unable to load class com.thinkaurelius.titan.diskstorage.solr.SolrIndex with selected loader sun.misc.Launcher$AppClassLoader@63e31ee
java.lang.ClassNotFoundException: com.thinkaurelius.titan.diskstorage.solr.SolrIndex
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_112]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_112]
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_112]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_112]
    at java.lang.Class.forName0(Native Method) ~[na:1.8.0_112]
    at java.lang.Class.forName(Class.java:348) ~[na:1.8.0_112]
    at com.thinkaurelius.titan.core.util.ReflectiveConfigOptionLoader.loadStandard(ReflectiveConfigOptionLoader.java:136) ~[titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.diskstorage.configuration.ConfigNamespace.getChild(ConfigNamespace.java:68) [titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.diskstorage.configuration.ConfigElement.parse(ConfigElement.java:180) [titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.diskstorage.configuration.BasicConfiguration.getAll(BasicConfiguration.java:80) [titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1327) [titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94) [titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:84) [titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.core.TitanFactory$Builder.open(TitanFactory.java:139) [titan-core-1.0.0.jar:na]
    at main.java.com.bag.server.database.TitanDatabaseAccess.start(TitanDatabaseAccess.java:56) [main/:na]
    at main.java.com.bag.server.TestServer.<init>(TestServer.java:105) [main/:na]
    at main.java.com.bag.server.TestServer.main(TestServer.java:428) [main/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_112]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_112]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_112]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_112]
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na]
22:56:01.462 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Loaded class com.thinkaurelius.titan.diskstorage.log.kcvs.KCVSLog with selected loader sun.misc.Launcher$AppClassLoader@63e31ee
22:56:01.463 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Loaded class com.thinkaurelius.titan.diskstorage.log.kcvs.KCVSLogManager with selected loader sun.misc.Launcher$AppClassLoader@63e31ee
22:56:01.463 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Loaded class com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration with selected loader sun.misc.Launcher$AppClassLoader@63e31ee
22:56:01.464 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Loaded class com.thinkaurelius.titan.graphdb.database.idassigner.placement.SimpleBulkPlacementStrategy with selected loader sun.misc.Launcher$AppClassLoader@63e31ee
22:56:01.465 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Loaded class com.thinkaurelius.titan.graphdb.database.idassigner.VertexIDAssigner with selected loader sun.misc.Launcher$AppClassLoader@63e31ee
22:56:01.465 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Loaded class com.thinkaurelius.titan.diskstorage.berkeleyje.BerkeleyJEStoreManager with selected loader sun.misc.Launcher$AppClassLoader@63e31ee
22:56:01.465 [main] INFO  c.t.t.c.u.ReflectiveConfigOptionLoader - Loaded and initialized config classes: 11 OK out of 12 attempts in PT0.035S
22:56:01.466 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Added preferred classloader to config option loader chain: sun.misc.Launcher$AppClassLoader@63e31ee
22:56:01.466 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Added thread context classloader to config option loader chain: sun.misc.Launcher$AppClassLoader@63e31ee
22:56:01.466 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Added caller classloader to config option loader chain: sun.misc.Launcher$AppClassLoader@63e31ee
22:56:01.493 [main] DEBUG org.reflections.Reflections - going to scan these urls:
file:/home/ray/IdeaProjects/BAG%20-%20Byzantine%20fault-tolerant%20Architecture%20for%20Graph%20database/build/classes/main/
22:56:01.497 [main] DEBUG org.reflections.Reflections - could not scan file main/java/com/bag/server/TestServer.class in url file:/home/ray/IdeaProjects/BAG%20-%20Byzantine%20fault-tolerant%20Architecture%20for%20Graph%20database/build/classes/main/ with scanner TypeAnnotationsScanner
22:56:01.497 [main] DEBUG org.reflections.Reflections - could not scan file main/java/com/bag/server/TestServer.class in url file:/home/ray/IdeaProjects/BAG%20-%20Byzantine%20fault-tolerant%20Architecture%20for%20Graph%20database/build/classes/main/ with scanner SubTypesScanner
22:56:01.497 [main] DEBUG org.reflections.Reflections - could not scan file main/java/com/bag/server/ConflictHandler.class in url file:/home/ray/IdeaProjects/BAG%20-%20Byzantine%20fault-tolerant%20Architecture%20for%20Graph%20database/build/classes/main/ with scanner TypeAnnotationsScanner
22:56:01.498 [main] DEBUG org.reflections.Reflections - could not scan file main/java/com/bag/server/ConflictHandler.class in url file:/home/ray/IdeaProjects/BAG%20-%20Byzantine%20fault-tolerant%20Architecture%20for%20Graph%20database/build/classes/main/ with scanner SubTypesScanner
22:56:01.502 [main] DEBUG org.reflections.Reflections - could not scan file main/java/com/bag/server/database/Neo4jDatabaseAccess.class in url file:/home/ray/IdeaProjects/BAG%20-%20Byzantine%20fault-tolerant%20Architecture%20for%20Graph%20database/build/classes/main/ with scanner TypeAnnotationsScanner
22:56:01.503 [main] DEBUG org.reflections.Reflections - could not scan file main/java/com/bag/server/database/Neo4jDatabaseAccess.class in url file:/home/ray/IdeaProjects/BAG%20-%20Byzantine%20fault-tolerant%20Architecture%20for%20Graph%20database/build/classes/main/ with scanner SubTypesScanner
22:56:01.506 [main] DEBUG org.reflections.Reflections - could not scan file main/java/com/bag/server/database/OrientDBDatabaseAccess.class in url file:/home/ray/IdeaProjects/BAG%20-%20Byzantine%20fault-tolerant%20Architecture%20for%20Graph%20database/build/classes/main/ with scanner TypeAnnotationsScanner
22:56:01.506 [main] DEBUG org.reflections.Reflections - could not scan file main/java/com/bag/server/database/OrientDBDatabaseAccess.class in url file:/home/ray/IdeaProjects/BAG%20-%20Byzantine%20fault-tolerant%20Architecture%20for%20Graph%20database/build/classes/main/ with scanner SubTypesScanner
22:56:01.508 [main] DEBUG org.reflections.Reflections - could not scan file main/java/com/bag/client/TestClient.class in url file:/home/ray/IdeaProjects/BAG%20-%20Byzantine%20fault-tolerant%20Architecture%20for%20Graph%20database/build/classes/main/ with scanner TypeAnnotationsScanner
22:56:01.508 [main] DEBUG org.reflections.Reflections - could not scan file main/java/com/bag/client/TestClient.class in url file:/home/ray/IdeaProjects/BAG%20-%20Byzantine%20fault-tolerant%20Architecture%20for%20Graph%20database/build/classes/main/ with scanner SubTypesScanner
22:56:01.516 [main] INFO  org.reflections.Reflections - Reflections took 22 ms to scan 1 urls, producing 6 keys and 13 values 
22:56:01.518 [main] DEBUG c.t.t.c.u.ReflectiveConfigOptionLoader - Preloaded 0 config option(s) via Reflections (0 class(es) with errors)
22:56:01.518 [main] DEBUG c.t.t.d.c.BasicConfiguration - Ignored configuration entry for index.search.DIRECTORY since it does not map to an option
java.lang.IllegalArgumentException: Unknown configuration element in namespace [root.index]: DIRECTORY
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145) ~[guava-18.0.jar:na]
    at com.thinkaurelius.titan.diskstorage.configuration.ConfigElement.parse(ConfigElement.java:181) ~[titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.diskstorage.configuration.BasicConfiguration.getAll(BasicConfiguration.java:80) ~[titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1327) [titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94) [titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:84) [titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.core.TitanFactory$Builder.open(TitanFactory.java:139) [titan-core-1.0.0.jar:na]
    at main.java.com.bag.server.database.TitanDatabaseAccess.start(TitanDatabaseAccess.java:56) [main/:na]
    at main.java.com.bag.server.TestServer.<init>(TestServer.java:105) [main/:na]
    at main.java.com.bag.server.TestServer.main(TestServer.java:428) [main/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_112]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_112]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_112]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_112]
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na]
22:56:01.557 [main] DEBUG c.t.t.d.c.BasicConfiguration - Ignored configuration entry for index.search.DIRECTORY since it does not map to an option
java.lang.IllegalArgumentException: Unknown configuration element in namespace [root.index]: DIRECTORY
    at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145) ~[guava-18.0.jar:na]
    at com.thinkaurelius.titan.diskstorage.configuration.ConfigElement.parse(ConfigElement.java:181) ~[titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.diskstorage.configuration.BasicConfiguration.getAll(BasicConfiguration.java:80) ~[titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1383) [titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94) [titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:84) [titan-core-1.0.0.jar:na]
    at com.thinkaurelius.titan.core.TitanFactory$Builder.open(TitanFactory.java:139) [titan-core-1.0.0.jar:na]
    at main.java.com.bag.server.database.TitanDatabaseAccess.start(TitanDatabaseAccess.java:56) [main/:na]
    at main.java.com.bag.server.TestServer.<init>(TestServer.java:105) [main/:na]
    at main.java.com.bag.server.TestServer.main(TestServer.java:428) [main/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_112]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_112]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_112]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_112]
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:na]
22:56:01.563 [main] DEBUG c.t.t.d.b.BerkeleyJEStoreManager - Removed database system_properties
22:56:01.613 [main] INFO  c.t.t.g.c.GraphDatabaseConfiguration - Generated unique-instance-id=c0a8000d21256-Laptop1
22:56:01.641 [main] INFO  c.t.titan.diskstorage.Backend - Configuring index [search]
Exception in thread "main" java.lang.IllegalArgumentException: Could not instantiate implementation: com.thinkaurelius.titan.diskstorage.es.ElasticSearchIndex
    at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:55)
    at com.thinkaurelius.titan.diskstorage.Backend.getImplementationClass(Backend.java:473)
    at com.thinkaurelius.titan.diskstorage.Backend.getIndexes(Backend.java:460)
    at com.thinkaurelius.titan.diskstorage.Backend.<init>(Backend.java:147)
    at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.getBackend(GraphDatabaseConfiguration.java:1805)
    at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.<init>(StandardTitanGraph.java:123)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94)
    at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:84)
    at com.thinkaurelius.titan.core.TitanFactory$Builder.open(TitanFactory.java:139)
    at main.java.com.bag.server.database.TitanDatabaseAccess.start(TitanDatabaseAccess.java:56)
    at main.java.com.bag.server.TestServer.<init>(TestServer.java:105)
    at main.java.com.bag.server.TestServer.main(TestServer.java:428)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:44)
    ... 16 more
Caused by: java.lang.NoSuchFieldError: LUCENE_3_6
    at org.elasticsearch.Version.<clinit>(Version.java:43)
    at com.thinkaurelius.titan.diskstorage.es.ElasticSearchIndex.checkExpectedClientVersion(ElasticSearchIndex.java:1059)
    at com.thinkaurelius.titan.diskstorage.es.ElasticSearchIndex.<init>(ElasticSearchIndex.java:186)
    ... 21 more

我的等级文件:

testCompile group: 'junit', name: 'junit', version: '4.11'
    compile files('libs/BFT-SMaRt.jar')
    compile "org.neo4j:neo4j-enterprise:${neo4jVersion}"
    compile group: 'commons-codec', name: 'commons-codec', version: '1.5'
    compile group: 'io.netty', name: 'netty-all', version: '4.0.36.Final'
    compile group: 'com.thinkaurelius.titan', name: 'titan-all', version: '1.0.0'
    compile group: 'com.sparsity', name: 'sparkseejava', version: '5.2.0'
    compile group: 'com.orientechnologies', name: 'orientdb-graphdb', version: '2.2.11'
    compile group: 'org.jboss.spec.javax.ws.rs', name: 'jboss-jaxrs-api_2.0_spec', version: '1.0.0.Final'
    compile group: 'com.esotericsoftware', name: 'kryo', version: '4.0.0'
    compile 'com.intellij:annotations:+@jar'
    compile group: 'org.apache.tinkerpop', name: 'gremlin-core', version: '3.0.0.M9-incubating'

您应该更具体地了解您的 Titan 依赖项,这样您就不会引入意外的工件。而不是使用titan-all,尝试这样的事情:

compile group: 'com.thinkaurelius.titan', name: 'titan-berkeleyje', version: '1.0.0'
compile group: 'com.thinkaurelius.titan', name: 'titan-es', version: '1.0.0'

您不需要包括gremlin-core明确地因为它是一个依赖项titan-core,但是如果您添加它,它应该与TinkerPop 版本 https://github.com/thinkaurelius/titan/blob/1.0.0/pom.xml#L62Titan 1.0 使用:

compile group: 'org.apache.tinkerpop', name: 'gremlin-core', version: '3.0.1-incubating'

Updated

您之前失败的尝试可能创建了一个无效的图形实例,存储在DIRECTORY。您必须递归删除DIRECTORY在尝试使用同一目录创建新图表之前。

Elasticsearch 索引后端无法与index.search.DIRECTORY配置(注意大小写)。这是堆栈跟踪的相关部分:

忽略了 index.search.DIRECTORY 的配置条目,因为它没有映射到选项 java.lang.IllegalArgumentException:命名空间 [root.index] 中的未知配置元素:DIRECTORY

您可以阅读有关各种 Elasticsearch 配置选项的更多信息第22章 http://s3.thinkaurelius.com/docs/titan/1.0.0/elasticsearch.html泰坦文档。

考虑使用而不是 ElasticsearchLucene http://s3.thinkaurelius.com/docs/titan/1.0.0/lucene.html。它的配置看起来与 BerkeleyJE 存储类似,两者都非常适合单机 Titan。

TitanFactory.Builder config = TitanFactory.build();
config.set("storage.backend", "berkeleyje");
config.set("storage.directory", DIRECTORY + File.separator + "berkeleyje");
config.set("index." + INDEX_NAME + ".backend", "lucene");
config.set("index." + INDEX_NAME + ".directory", DIRECTORY + File.separator + "lucene");
graph = config.open();

还更新build.gradle与 lucene 的依赖关系:

compile group: 'com.thinkaurelius.titan', name: 'titan-berkeleyje', version: '1.0.0'
compile group: 'com.thinkaurelius.titan', name: 'titan-lucene', version: '1.0.0'

我还建议首先尝试构建一个没有 Neo4j、OrientDB、Sparksee 和其他非 Titan 依赖项的 Titan 项目,以确保您拥有一个可以在没有任何依赖项冲突的情况下运行的简单项目。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Titan 加载弹性搜索问题 的相关文章

随机推荐

  • 私人变更的用例

    假设我有以下场景 我克隆了一些开源项目 例如从 URL X 克隆的项目 现在我有了它的本地克隆 我对本地克隆进行了一些更改以尝试并在本地提交它们 现在我想要的是以下内容 我想从开源项目 X 获取更新 只需获取其所有最新代码 无需我进行任何更
  • 使用 Google 进行 OWIN 身份验证

    我在 ASPNET MVC 项目上使用 owin 身份验证 使用google时遇到以下问题 1 用户使用google帐户登录 2 用户退出 3 下次用户尝试登录时 将自动使用当前的google帐户再次登录 而不提示用户是否要使用其他帐户 问
  • gdb nostop SIGSEGV 在特定线程上

    我有一个程序故意在一个线程上出现段错误 但我有一个问题 另一个线程出现段错误 我想用 GDB 捕获它 我看到我可以 handle SIGSEGV nostop noprint 但我只想在故意这样做的线程上这样做 有可能吗 我会解释一下 我有
  • extern auto 变量没有初始值设定项

    我需要在我的 C 程序中使用全局时间戳 std chrono high resolution clock now 我在头文件Header h中声明了它 include
  • Tomcat 10 上的 Spring Boot 2.x 问题

    我试图在 Tomcat Docker 容器中部署一个 war 文件 但总是得到404 Not Found页 我通过以下方式创建了 Spring Boot 项目Intellij 教程 https www jetbrains com help
  • javascript 在多个链式异步函数上等待

    假设我有以下内容 const a new A await a getB action A prototype getB is async也B prototype action 如果我尝试等待函数的链接 则会收到错误 TypeError a
  • SoapExtension 未加载

    我正在尝试写一个肥皂扩展 但框架没有加载它 我已经添加到 web config
  • 不同的Android SDK版本使用不同的图标

    我的 Android 菜单有图标 在 Android 3 上 我使用黑色 ActionBar 因此图标为白色 然而 在 Android 2 x 上 菜单本质上是白色的 这意味着图标几乎不可见 如何为不同版本使用不同的菜单图标 我假设我可以使
  • 我们如何重命名MySQL 5.0中的数据库名称[重复]

    这个问题在这里已经有答案了 我在用MySQL 5 0 我创建了一个名为accounts 但现在我想将数据库名称更改为FinanceAccounts 如何更改数据库名称MySQL 5 0 我认为只有一种方法 除了重命名 MySQL datad
  • 安全移动 Microsoft SDK 文件夹

    我的硬盘上有一个文件夹 C Program Files Microsoft SDKs 我想知道将其移动到外部驱动器是否安全 Visual Studio 或任何其他工具是否依赖于此特定文件夹 注册表中有相当多的条目 至少在我的注册表中 指向该
  • Cython指定固定长度字符串的numpy数组

    我有一个函数 我想使用 Cython 来处理大量固定长度的字符串 对于标准 cython 函数 我可以像这样声明数组的类型 cpdef double g double in arr cdef double out arr np zeros
  • 对话框的对象位置 Libgdx

    我有一个对话框 Dialog dialog new Dialog style dialog setSize 400 500 dialog setPosition Gdx graphics getWidth 2 200 Gdx graphic
  • 使用自动 bash 脚本检查 FTP 中是否存在文件

    我想自动化执行以下操作的批处理作业 检查我的file txt存在于FTP服务器中 我将其重命名为file trt 检查我的file txt and file trt存在 如果存在我发送电子邮件 我运行另一个脚本 最后我删除file trt
  • Ruby+Anemone Web Crawler:正则表达式匹配以一系列数字结尾的 URL

    假设我正在尝试抓取一个网站并跳过一个像这样结束的页面 我目前正在 Ruby 中使用 Anemone gem 来构建爬虫 我正在使用skip links like方法 但我的模式似乎永远不匹配 我试图使其尽可能通用 因此它不依赖于子页面 而只
  • 为什么这个 Sql 语句(有 2 个表连接)需要 5 分钟才能完成?

    更新 下面添加了 3 个更新 以下sql语句需要5分钟才能完成 我只是 不 得到 它 第一个表有 6861534 行 第二个表少了一点 第三个表 包含 4 个地理字段 与第一个表相同 Those GEOGRAPHY第三个表中的字段 它们不应
  • 错误域=FIRFirestoreErrorDomain 代码=7“权限缺失或不足。”

    所以我有以下代码从 firestore 检索文档 该函数在我的 viewDidLoad 中调用 func loadAnnotations db collection jumpSpotAnnotations getDocuments quer
  • 将静态库链接到共享库

    我正在尝试在 Ubuntu Linux 上使用 g 5 4 0 创建共享库 我已经构建了 Poco C 库的静态库 a 文件 我想将它们静态链接到我的共享库中 但它不起作用 我已将以下字符串添加到我的构建脚本中 Wl whole archi
  • 如何使用c#读取EPS的属性或颜色信息?

    我的要求是读取另外50个EPS文件并导出EPS的属性 颜色模式 这可能吗 颜色模式有灰度 RGB 和 CMYK 到目前为止 我尝试使用 BitmapImage 来读取 EPS 但我没有运气 BitmapImage 不读取 EPS 因为它是矢
  • ANDROID:如何将视频文件下载到 SD 卡?

    我在网站上有一个 MP4 格式的视频文件 我希望用户能够通过单击链接将该视频下载到他们的 SD 卡上 是否有捷径可寻 我目前有这段代码 但它不起作用 不知道我做错了什么 谢谢你的帮助 import java io BufferedInput
  • Titan 加载弹性搜索问题

    我使用以下代码来加载泰坦 TitanFactory Builder config TitanFactory build config set storage backend berkeleyje config set storage dir