1

我是泰坦领域的新手,所以我会尽可能简单地回答这个问题。

使用此处提供的说明,我能够成功地将 1 个运行 Titan 0.3.2 的 linux 节点连接到 Datastax/Cassandra 实例作为后端。

然后我下载了 Titan 0.4.0 并尝试了相同的操作,但收到了后端异常。为了更好地衡量,我将 .properties 文件中的键空间更改为“titan4”,然后我看到它反映在 Cassandra 后端中。

然而,尽管成功地看到了在 Cassandra 中创建的“titan4”键空间,但我得到了一个相当无用的异常和堆栈跟踪。我是一个业余爱好者,对所涉及的所有技术都非常陌生。任何帮助是极大的赞赏。

gremlin> g = TitanFactory.open('conf/titan-t2.properties')
Permanent exception during backend operation
Display stack trace? 

_

com.thinkaurelius.titan.core.TitanException: Permanent exception during backend operation
        at com.thinkaurelius.titan.diskstorage.util.BackendOperation.execute(BackendOperation.java:32)
        at com.thinkaurelius.titan.diskstorage.Backend.initialize(Backend.java:252)
        at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.getBackend(GraphDatabaseConfiguration.java:683)
        at com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.<init>(StandardTitanGraph.java:72)
        at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:40)
        at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:29)
        at com.thinkaurelius.titan.core.TitanFactory$open.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at groovysh_evaluate.run(groovysh_evaluate:56)
        at groovysh_evaluate$run.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:112)
        at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:67)
        at org.codehaus.groovy.tools.shell.Interpreter$evaluate.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:152)
        at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:114)
        at org.codehaus.groovy.tools.shell.Shell$leftShift$0.call(Unknown Source)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:88)
        at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1079)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:148)
        at org.codehaus.groovy.tools.shell.InteractiveShellRunner.work(InteractiveShellRunner.groovy:100)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:272)
        at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:52)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:137)
        at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:57)
        at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$run(InteractiveShellRunner.groovy)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1079)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:148)
        at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:66)
        at com.thinkaurelius.titan.tinkerpop.gremlin.Console.<init>(Console.java:57)
        at com.thinkaurelius.titan.tinkerpop.gremlin.Console.<init>(Console.java:70)
        at com.thinkaurelius.titan.tinkerpop.gremlin.Console.main(Console.java:96)
    Caused by: com.thinkaurelius.titan.diskstorage.PermanentStorageException: Permanent failure in storage backend
        at com.thinkaurelius.titan.diskstorage.cassandra.thrift.CassandraThriftStoreManager.setConfigurationProperty(CassandraThriftStoreManager.java:479)
        at com.thinkaurelius.titan.diskstorage.Backend$2.call(Backend.java:257)
        at com.thinkaurelius.titan.diskstorage.Backend$2.call(Backend.java:252)
        at com.thinkaurelius.titan.diskstorage.util.BackendOperation.execute(BackendOperation.java:29)
        ... 61 more
    Caused by: java.lang.NullPointerException
        at org.apache.cassandra.utils.ByteBufferUtil.bytes(ByteBufferUtil.java:243)
        at org.apache.cassandra.cql.jdbc.JdbcUTF8.decompose(JdbcUTF8.java:98)
        at org.apache.cassandra.db.marshal.UTF8Type.decompose(UTF8Type.java:39)
        at org.apache.cassandra.db.marshal.UTF8Type.fromString(UTF8Type.java:61)
        at com.thinkaurelius.titan.diskstorage.cassandra.thrift.CassandraThriftStoreManager.setConfigurationProperty(CassandraThriftStoreManager.java:470)

编辑:

登录 Datastax 图像:

卡桑德拉版本

和 Java 版本(我必须在 Linux AMI 上从 1.6 手动升级到 1.7,否则 Gremlin 将无法运行)

爪哇版

4

2 回答 2

2

我在你的 Datastax AMI 机器上看到你有 Cassandra 2,而Titan 已经测试了与较低版本的 Cassandra (1.2) 的兼容性。

尝试安装 Cassandra 1.2 并重试。

编辑

自 Titan 0.50 起,Cassandra 1.2 和 2.0 均受支持,如兼容性页面所述。

于 2013-12-20T14:32:22.207 回答
2

我已经能够对运行 C* 2.0.11 的 DSE 4.6 使用 Titan

这是 Aurelius 团队的最新测试——http: //s3.thinkaurelius.com/docs/titan/0.5.4/version-compat.html#d0e15023

以下是我在 DSE 盒子上遵循的步骤:

拉取并提取二进制文件

wget http://s3.thinkaurelius.com/downloads/titan/titan-all-0.4.4.zip
unzip titan-all-0.4.4.zip 



cd titan-all-0.4.4
bin/gremlin.sh

在 Gremlin shell 中加载数据库:

g = TitanFactory.open('conf/titan-cassandra-es.properties')
GraphOfTheGodsFactory.load(g)

一些快速测试:

saturn = g.V('name','saturn').next()
saturn.getProperty('name')
saturn.map()
saturn.in('father').in('father').name

g.E.has('place',WITHIN,Geoshape.circle(37.97,23.72,50))
于 2015-02-04T07:36:21.967 回答