Titan DB 1.0 : Cannot import Json file into titan TinkerPop 3.0.1

242 views
Skip to first unread message

vit...@talenttribe.me

unread,
Oct 31, 2016, 10:03:37 AM10/31/16
to Aurelius
How make import from JSON  file into titan DB , when i use geolocation property ??

I'm working with Titan DB TP3 - version 3.01

    gremlin> Gremlin.version()
    ==>3.0.1-incubating
    gremlin>

and using GeoShape index property (geolocation) , 
trying to export and import into new DB. 

My steps are as following:

       //export : 
            tg = TitanFactory.open(‘../conf/titan-db.properties’)
            tg.io(IoCore.graphson()).writeGraph('/var/backups/PRODUCTION_DATA_27_10_16.json');

 

      //import to new DB:
           tg.io(IoCore.graphson()).readGraph('/var/backups/PRODUCTION_DATA_27_10_16.json'); 


but unfortunately got exception :

    gremlin> tg.io(IoCore.graphson()).readGraph('/var/backups/PRODUCTION_DATA_27_10_16.json');
    Property value [{type=Point, coordinates=[33.0, 32.0]}] is of type class java.util.LinkedHashMap is not supported
    Display stack trace? [yN] y
    java.lang.IllegalArgumentException: Property value [{type=Point, coordinates=[33.0, 32.0]}] is of type class java.util.LinkedHashMap is not supported
    at org.apache.tinkerpop.gremlin.structure.Property$Exceptions.dataTypeOfPropertyValueNotSupported(Property.java:159)
    at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx.verifyAttribute(StandardTitanTx.java:564)
    at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx.addProperty(StandardTitanTx.java:716)
    at com.thinkaurelius.titan.graphdb.vertices.AbstractVertex.property(AbstractVertex.java:142)
    at com.thinkaurelius.titan.graphdb.vertices.AbstractVertex.property(AbstractVertex.java:23)
    at org.apache.tinkerpop.gremlin.structure.util.Attachable$Method.lambda$createVertex$26(Attachable.java:296)



Please any solutions .. .?





Jason Plurad

unread,
Oct 31, 2016, 1:59:43 PM10/31/16
to Aurelius

Jason Plurad

unread,
Nov 1, 2016, 8:21:21 AM11/1/16
to Vitaly Tarasiuk, Aurelius
Hi Vitaly,

Posting response to Aurelius mailing list

Cassandra 2.1 will work fine with Titan -- in fact, it is the supported version.

I'm not clear on what property file format this is:

property file:
 {  titan-db.properties ->
   storage.backend=cassandra
   storage.backend=cassandraserver2-cassandra-00
}

The storage.backend value should be cassandra or cassandrathrift. If you want to use a different keyspace, use storage.cassandra.keyspace=foobar (the default keyspace is titan).

The stack trace you included seems incomplete. If you could recreate and send over the complete stack trace from top to bottom so that it includes any nested exceptions, that would be much more helpful.

-- Jason


On Tue, Nov 1, 2016 at 7:43 AM, Vitaly Tarasiuk <vit...@talenttribe.me> wrote:
Hi,

I very appreciate your help.
still got a problem of running the new titan11 with my old cassandra V 2.1.x

Please see my steps bellow:

2. I downloaded and installed the new titan 1.1
3. I open "./gremlin.sh" (see output bellow)

vitalys-MBP:bin vitaly$
vitalys-MBP:bin vitaly$ sudo ./gremlin.sh
objc[15207]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.

         \,,,/
         (o o)
-----oOOo-(3)-oOOo-----
plugin activated: aurelius.titan
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/vitaly/titan11/titan-1.1.0-SNAPSHOT-hadoop2/lib/slf4j-log4j12-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/vitaly/titan11/titan-1.1.0-SNAPSHOT-hadoop2/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
log4j:WARN No appenders could be found for logger (org.apache.hadoop.util.Shell).
log4j:WARN Please initialize the log4j system properly.
plugin activated: tinkerpop.hadoop
plugin activated: tinkerpop.spark
plugin activated: tinkerpop.tinkergraph
gremlin>
gremlin>
gremlin>
gremlin>

4. I got an exception after enter cassandar as you can see bellow:  ) This Exception happened only in new titan 1.1 version - it works in titan1.0

property file:
 {  titan-db.properties ->
   storage.backend=cassandra
   storage.backend=cassandraserver2-cassandra-00
}




gremlin>
gremlin> tg = TitanFactory.open('../conf/titan-db.properties')
Could not instantiate implementation: com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager
Display stack trace? [yN] y
java.lang.IllegalArgumentException: Could not instantiate implementation: com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager
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.getStorageManager(Backend.java:407)
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1325)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:62)
at com.thinkaurelius.titan.core.TitanFactory$open.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at groovysh_evaluate.run(groovysh_evaluate:3)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:218)
at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:70)
at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:187)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:218)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:218)
at org.codehaus.groovy.tools.shell.ShellRunner.work(ShellRunner.groovy:95)
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:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) 


what could it be ??

--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraphs+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/1006de64-a771-47af-9137-12164b997121%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


Vitaly Tarasiuk

unread,
Nov 1, 2016, 8:48:28 AM11/1/16
to Jason Plurad, Aurelius
This is the old version:


==================================== This is the new titan 1.0 version: ===========================

gremlin>
gremlin> Gremlin.version()
==>3.0.1-incubating
gremlin>
gremlin>
gremlin>  tg = TitanFactory.open('../conf/titan-db.properties')
==>standardtitangraph[cassandra:[cassandraserver2-cassandra-00]]
gremlin>
gremlin>
gremlin>

==================================== This is the new titan 1.1 version: ===========================

This is the new titan 1.1 version: (same properties)


gremlin>
gremlin>
gremlin> Gremlin.version()
==>3.1.1-incubating
gremlin>
gremlin>
gremlin> tg = TitanFactory.open('../conf/titan-db.properties')
Could not instantiate implementation: com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager
Display stack trace? [yN] y
java.lang.IllegalArgumentException: Could not instantiate implementation: com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager
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.getStorageManager(Backend.java:407)
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1325)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:62)
at com.thinkaurelius.titan.core.TitanFactory$open.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at groovysh_evaluate.run(groovysh_evaluate:3)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:218)
at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:70)
at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:187)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
at sun.reflect.GeneratedMethodAccessor29.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1210)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:152)
at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:59)
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:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1210)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:152)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:83)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:218)
at org.apache.tinkerpop.gremlin.console.Console.<init>(Console.groovy:144)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:218)
at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:305)
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:422)
at com.thinkaurelius.titan.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:44)
... 41 more
Caused by: com.thinkaurelius.titan.diskstorage.TemporaryBackendException: Temporary failure in storage backend
at com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager.ensureKeyspaceExists(AstyanaxStoreManager.java:580)
at com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager.<init>(AstyanaxStoreManager.java:291)
... 46 more
Caused by: com.netflix.astyanax.connectionpool.exceptions.PoolTimeoutException: PoolTimeoutException: [host=cassandraserver2-cassandra-00(cassandraserver2-cassandra-00):9160, latency=10005(10005), attempts=1]Timed out waiting for connection
at com.netflix.astyanax.connectionpool.impl.SimpleHostConnectionPool.waitForConnection(SimpleHostConnectionPool.java:231)
at com.netflix.astyanax.connectionpool.impl.SimpleHostConnectionPool.borrowConnection(SimpleHostConnectionPool.java:198)
at com.netflix.astyanax.connectionpool.impl.RoundRobinExecuteWithFailover.borrowConnection(RoundRobinExecuteWithFailover.java:84)
at com.netflix.astyanax.connectionpool.impl.AbstractExecuteWithFailoverImpl.tryOperation(AbstractExecuteWithFailoverImpl.java:117)
at com.netflix.astyanax.connectionpool.impl.AbstractHostPartitionConnectionPool.executeWithFailover(AbstractHostPartitionConnectionPool.java:352)
at com.netflix.astyanax.thrift.ThriftClusterImpl.executeSchemaChangeOperation(ThriftClusterImpl.java:146)
at com.netflix.astyanax.thrift.ThriftClusterImpl.internalCreateKeyspace(ThriftClusterImpl.java:321)
at com.netflix.astyanax.thrift.ThriftClusterImpl.addKeyspace(ThriftClusterImpl.java:294)
at com.thinkaurelius.titan.diskstorage.cassandra.astyanax.AstyanaxStoreManager.ensureKeyspaceExists(AstyanaxStoreManager.java:575)
... 47 more
gremlin>
gremlin>
gremlin>

Jason Plurad

unread,
Nov 1, 2016, 9:11:57 AM11/1/16
to Aurelius
I don't know what might be causing that error. I haven't run into this error before.


Caused by: com.netflix.astyanax.connectionpool.exceptions.PoolTimeoutException: PoolTimeoutException: [host=cassandraserver2-cassandra-00(cassandraserver2-cassandra-00):9160, latency=10005(10005), attempts=1]Timed out waiting for connection

One suggestion would be to try setting storage.backend=cassandrathrift instead of cassandra to see if it has similar timeout behavior.

-- Jason

To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.

Jason Plurad

unread,
Nov 1, 2016, 9:24:12 AM11/1/16
to Aurelius
Are the 2 Titan versions installed on the same machine? Maybe there's a hostname lookup issue? Try using the IP address instead of the hostname for the storage.host, and double check that Cassandra is listening on the same IP and port configured in the titan properties.

-- Jason

Vitaly Tarasiuk

unread,
Nov 1, 2016, 10:06:00 AM11/1/16
to Aurelius
Ohhh...solved that issue , change the ip routing , they weren't on same machine ....but now have different issue :

gremlin>  tg = TitanFactory.open('../conf/titan-db.properties')
StorageBackend version is incompatible with current Titan version: storage=1.0.0 vs. runtime=1.1.0-SNAPSHOT
Display stack trace? [yN] y
com.thinkaurelius.titan.core.TitanException: StorageBackend version is incompatible with current Titan version: storage=1.0.0 vs. runtime=1.1.0-SNAPSHOT
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1373)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:62)
at com.thinkaurelius.titan.core.TitanFactory$open.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at groovysh_evaluate.run(groovysh_evaluate:3)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:218)
at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:70)
at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:187)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122)
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:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1210)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:152)
at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:59)
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:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1210)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:152)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:83)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:218)
at org.apache.tinkerpop.gremlin.console.Console.<init>(Console.groovy:144)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:218)
at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:305)
gremlin>
gremlin>
gremlin> 

To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraphs+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/8842d396-8cc1-41b7-a5e9-2561d19aa035%40googlegroups.com.

Jason Plurad

unread,
Nov 1, 2016, 10:23:22 AM11/1/16
to Aurelius
Either use a new storage.cassandra.keyspace, or rebuild titan11 with an update to this line in the root pom.xml
https://github.com/thinkaurelius/titan/blob/titan11/pom.xml#L66

<titan.compatible.versions>1.0.0</titan.compatible.versions>

-- Jason

Vitaly Tarasiuk

unread,
Nov 1, 2016, 10:46:45 AM11/1/16
to Aurelius, Jason Plurad
Ok..Success to connect but got the same exception at import

now my root pom.xml looks like: 

<properties>
        <titan.compatible.versions>1.0.0</titan.compatible.versions>
        <tinkerpop.version>3.1.1-incubating</tinkerpop.version>
        <junit.version>4.12</junit.version>
        <mrunit.version>1.1.0</mrunit.version>
        <cassandra.version>2.1.9</cassandra.version>
     ......
   .....


rebuild by typing  :

1. mvn clean install -DskipTests=true -Dgpg.skip=true -Paurelius-release

2. unzip titan
-dist/titan-dist-hadoop-2/target/titan-1.1.0-SNAPSHOT-hadoop2.zip

 tg = TitanFactory.open('../conf/titan-db.properties')
==>standardtitangraph[cassandra:[cassandraserver2-cassandra-00]]
gremlin>
gremlin>
gremlin> Gremlin.version
==>3.1.1-incubating
gremlin>
gremlin>
gremlin>
gremlin> tg.io(IoCore.graphson()).readGraph('/var/backups/PRODUCTION_DATA_27_10_16.json');
Property value [{type=Point, coordinates=[33.0, 32.0]}] is of type class java.util.LinkedHashMap is not supported
Display stack trace? [yN] y
java.lang.IllegalArgumentException: Property value [{type=Point, coordinates=[33.0, 32.0]}] is of type class java.util.LinkedHashMap is not supported
at org.apache.tinkerpop.gremlin.structure.Property$Exceptions.dataTypeOfPropertyValueNotSupported(Property.java:163)
at org.apache.tinkerpop.gremlin.structure.Property$Exceptions.dataTypeOfPropertyValueNotSupported(Property.java:159)
at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx.verifyAttribute(StandardTitanTx.java:564)
at com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx.addProperty(StandardTitanTx.java:716)
at com.thinkaurelius.titan.graphdb.vertices.AbstractVertex.property(AbstractVertex.java:142)
at com.thinkaurelius.titan.graphdb.vertices.AbstractVertex.property(AbstractVertex.java:23)
at org.apache.tinkerpop.gremlin.structure.util.Attachable$Method.lambda$createVertex$27(Attachable.java:296)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at org.apache.tinkerpop.gremlin.structure.util.Attachable$Method.createVertex(Attachable.java:293)
at org.apache.tinkerpop.gremlin.structure.util.Attachable$Method.lambda$create$25(Attachable.java:149)
at org.apache.tinkerpop.gremlin.structure.util.Attachable.attach(Attachable.java:63)
at org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONReader.lambda$readGraph$54(GraphSONReader.java:105)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Iterator.forEachRemaining(Iterator.java:116)
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONReader.readGraph(GraphSONReader.java:103)
at org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONIo.readGraph(GraphSONIo.java:86)
at org.apache.tinkerpop.gremlin.structure.io.Io$readGraph.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at groovysh_evaluate.run(groovysh_evaluate:3)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:218)
at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:70)
at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:187)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:122)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1210)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:152)
at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:59)
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:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1210)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:132)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:152)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:83)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:218)
at org.apache.tinkerpop.gremlin.console.Console.<init>(Console.groovy:144)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:218)
at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:305)
gremlin>
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraphs+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/01c7d72a-ef53-4c8f-806d-eadd7ff85dd6%40googlegroups.com.

Jason Plurad

unread,
Nov 1, 2016, 10:58:04 AM11/1/16
to Aurelius, plu...@gmail.com
Maybe you can try export/import the data as Gryo instead of GraphSON?

Vitaly Tarasiuk

unread,
Nov 1, 2016, 11:07:59 AM11/1/16
to Aurelius, Jason Plurad
As following docs:


do I  need extra jars for that....? I've tried and no got error

remlin>
gremlin>
gremlin> final Graph graph = TinkerFactory.createModern();
==>tinkergraph[vertices:6 edges:6]
gremlin> graph.io(IoCore.gryo()).writeGraph("tinkerpop-modern.kryo");
No such property: graph for class: groovysh_evaluate
Display stack trace? [yN] y
groovy.lang.MissingPropertyException: No such property: graph for class: groovysh_evaluate
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)
at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:52)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:307)
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraphs+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/30eee9f8-be5e-4a99-a760-f312dc551df0%40googlegroups.com.

Jason Plurad

unread,
Nov 1, 2016, 11:24:41 AM11/1/16
to Aurelius
When you're in the Gremlin Console, you should not declare variables as "final Graph graph = ..."

GraphOfTheGods uses Geoshape, and it works ok with Gryo.

gremlin> graph = TitanFactory.build().set('storage.backend', 'cassandra').set('storage.cassandra.keyspace', 'gods').open()
==>standardtitangraph[cassandra:[127.0.0.1]]
gremlin
> GraphOfTheGodsFactory.load(graph, null, false)
==>null
gremlin
> graph.io(gryo()).writeGraph('/tmp/gods.kryo')
==>null
gremlin
> vitaly = TitanFactory.build().set('storage.backend', 'cassandra').set('storage.cassandra.keyspace', 'vitaly').open()
==>standardtitangraph[cassandra:[127.0.0.1]]
gremlin
> vitaly.io(gryo()).readGraph('/tmp/gods.kryo')
==>null

I didn't look closely enough previously, but it looks like there is only a Geoshape serializer registered for Gryo.
https://github.com/thinkaurelius/titan/blob/titan11/titan-core/src/main/java/com/thinkaurelius/titan/graphdb/tinkerpop/TitanIoRegistry.java#L23

Looks like there's still some work to do in this space for GraphSON.

-- Jason

Vitaly Tarasiuk

unread,
Nov 2, 2016, 4:35:24 AM11/2/16
to Aurelius, Jason Plurad
So i'm trying to export production DB which is 1.0 with Gryo and import with titan11

P.S , i've success to import export with titan11 , but my production data using titan 1.0

it titan 1.0 export  Failed with Exception- :( !!
 =====================================    OUTPUT =============================
gremlin>
gremlin> Gremlin.version()
==>3.0.1-incubating
gremlin>
gremlin>
gremlin>
gremlin> tg = TitanFactory.open('../conf/titan-db.properties')
==>standardtitangraph[cassandra:[cassandraprod1-cassandra-00]]
gremlin>
gremlin>
gremlin> tg.io(gryo()).writeGraph('/tmp/production.kryo')
Class is not registered: com.thinkaurelius.titan.core.attribute.Geoshape
Note: To register this class use: kryo.register(com.thinkaurelius.titan.core.attribute.Geoshape.class);
Display stack trace? [yN] y
java.lang.IllegalArgumentException: Class is not registered: com.thinkaurelius.titan.core.attribute.Geoshape
Note: To register this class use: kryo.register(com.thinkaurelius.titan.core.attribute.Geoshape.class);
at org.apache.tinkerpop.shaded.kryo.Kryo.getRegistration(Kryo.java:484)
at org.apache.tinkerpop.gremlin.structure.io.gryo.GryoClassResolver.writeClass(GryoClassResolver.java:133)
at org.apache.tinkerpop.shaded.kryo.Kryo.writeClass(Kryo.java:514)
at org.apache.tinkerpop.shaded.kryo.Kryo.writeClassAndObject(Kryo.java:619)
at org.apache.tinkerpop.gremlin.structure.util.star.StarGraphGryoSerializer.write(StarGraphGryoSerializer.java:91)
at org.apache.tinkerpop.gremlin.structure.util.star.StarGraphGryoSerializer.write(StarGraphGryoSerializer.java:47)
at org.apache.tinkerpop.shaded.kryo.Kryo.writeObject(Kryo.java:531)
at org.apache.tinkerpop.gremlin.structure.io.gryo.GryoWriter.writeVertexInternal(GryoWriter.java:149)
at org.apache.tinkerpop.gremlin.structure.io.gryo.GryoWriter.writeVertices(GryoWriter.java:70)
at org.apache.tinkerpop.gremlin.structure.io.gryo.GryoWriter.writeGraph(GryoWriter.java:59)
at org.apache.tinkerpop.gremlin.structure.io.gryo.GryoIo.writeGraph(GryoIo.java:76)
at org.apache.tinkerpop.gremlin.structure.io.Io$writeGraph.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:122)
at groovysh_evaluate.run(groovysh_evaluate:3)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:69)
at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:185)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:119)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)
at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
at org.codehaus.groovy.tools.shell.ShellRunner.run(ShellRunner.groovy:58)
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:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:130)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:150)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.run(InteractiveShellRunner.groovy:82)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.apache.tinkerpop.gremlin.console.Console.<init>(Console.groovy:144)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.apache.tinkerpop.gremlin.console.Console.main(Console.groovy:303)
gremlin>

To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraphs+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/e69549c6-83ed-4c4d-92e5-ae182273a8be%40googlegroups.com.

Jason Plurad

unread,
Nov 2, 2016, 2:36:56 PM11/2/16
to Aurelius, plu...@gmail.com
Hi Vitaly,

Right, the issue was identified and fixed after the Titan 1.0 release. You could apply the fix to the 1.0.0 source code and build it.

-- Jason
...

Vitaly Tarasiuk

unread,
Nov 2, 2016, 3:19:20 PM11/2/16
to Aurelius, Jason Plurad
So , am i need to upgrade the server with new db 1.0.1 (the closet fixed version)  ? or may be didn't got it ..


git clone https://github.com/thinkaurelius/titan -b titan10 titan10
cd titan10
mvn clean install 
-DskipTests=true -Dgpg.skip=true -Paurelius-release
unzip titan
-dist/titan-dist-hadoop-1/target/titan-1.0.1-SNAPSHOT-hadoop1.zip

??

thanks

Jason Plurad

unread,
Nov 2, 2016, 5:16:11 PM11/2/16
to Aurelius
Apologies for my last message, it probably sent you off in the wrong direction.

If you built titan11 with the compatibility flag, you should be able to point it at your production Cassandra keyspace and export the data out as a Gryo file.

How big is the graph (#vertices, #edges)?

-- Jason
...

Vitaly Tarasiuk

unread,
Nov 3, 2016, 5:33:07 AM11/3/16
to Aurelius
Have about 15,000 vertices and edges . 

my steps :

1. I build titan11 with cassandra 2.19 backend ,

edit POM.xml:

  <properties>
 <titan.compatible.versions>1.0.0</titan.compatible.versions>
        <tinkerpop.version>3.1.1-incubating</tinkerpop.version>
        <junit.version>4.12</junit.version>
        <mrunit.version>1.1.0</mrunit.version>
        <cassandra.version>2.1.9</cassandra.version>
............

succeed to export/import with Gryo.



2. Now i'm trying to connect with previous  server + titan 1.0 to cassandra 2.19 (which almost included imported data by titan11)

unfortunately got another time opposite EXCEPTION.... 

maybe i need to create another configuration properly (additionally to POM.xml - <titan.compatible.versions>1.0.0</titan.compatible.versions> ) ,  to run titan 1.0 with cassandra 2.19 that has data imported with titan 1.1  ?????





gremlin>
gremlin> Gremlin.version()
==>3.0.1-incubating
gremlin>
gremlin>
> v = TitanFactory.open('../conf/titan-db.properties')
StorageBackend version is incompatible with current Titan version: storage=1.1.0-SNAPSHOT vs. runtime=1.0.0
Display stack trace? [yN] y
com.thinkaurelius.titan.core.TitanException: StorageBackend version is incompatible with current Titan version: storage=1.0.1-SNAPSHOT vs. runtime=1.0.0
at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1368)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:94)
at com.thinkaurelius.titan.core.TitanFactory.open(TitanFactory.java:62)
at com.thinkaurelius.titan.core.TitanFactory$open.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:110)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:122)
at groovysh_evaluate.run(groovysh_evaluate:3)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.codehaus.groovy.tools.shell.Interpreter.evaluate(Interpreter.groovy:69)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.codehaus.groovy.tools.shell.Groovysh.execute(Groovysh.groovy:185)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.codehaus.groovy.tools.shell.Shell.leftShift(Shell.groovy:119)
at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
at org.codehaus.groovy.tools.shell.InteractiveShellRunner.super$2$work(InteractiveShellRunner.groovy)

--
You received this message because you are subscribed to the Google Groups "Aurelius" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraphs+unsubscribe@googlegroups.com.

Jason Plurad

unread,
Nov 3, 2016, 8:43:12 AM11/3/16
to Aurelius
Hi Vitaly,

So it sounds like what you really want to do is make a patched Titan 1.0 with just the gryo serialization fix. Here's what you can do:

git clone https://github.com/thinkaurelius/titan.git
cd titan
git checkout
1.0.0
git cherry
-pick 6dfc816d821a7739398e5cebc1e999d75c866c19

mvn clean install
-DskipTests=true -Dgpg.skip=true -Paurelius-
release
unzip titan
-dist/titan-dist-hadoop-1/target/titan-1.0.0-hadoop1.zip
cd titan
-1.0.0-hadoop1
./bin/gremlin.sh

gremlin
> Titan.version()
==>1.0.0
gremlin
> Gremlin.version()
==>3.0.1-incubating
gremlin
> graph = TitanFactory.open('inmemory')
==>standardtitangraph[inmemory:[127.0.0.1]]

gremlin
> GraphOfTheGodsFactory.load(graph, null, false)
==>null
gremlin
> graph.io(gryo()).writeGraph('/tmp/gods.kryo')
==>null

gremlin
> graph = TitanFactory.open('inmemory')
==>standardtitangraph[inmemory:[127.0.0.1]]
gremlin
> graph.io(gryo()).readGraph('/tmp/gods.kryo')
==>null
gremlin
> g = graph.traversal()
==>graphtraversalsource[standardtitangraph[inmemory:[127.0.0.1]], standard]
gremlin
> g.V().count()
08:34:29 WARN  com.thinkaurelius.titan.graphdb.transaction.StandardTitanTx  - Query requires iterating over all vertices [()]. For better performance, use indexes
==>12

-- Jason
To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraph...@googlegroups.com.

Vitaly Tarasiuk

unread,
Nov 3, 2016, 9:30:10 AM11/3/16
to Aurelius
yes , it is exactly i need , i'll check it...

To unsubscribe from this group and stop receiving emails from it, send an email to aureliusgraphs+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aureliusgraphs/e162581d-e0aa-42fb-b697-f74c72ede6c3%40googlegroups.com.

Vitaly Tarasiuk

unread,
Nov 6, 2016, 5:40:04 AM11/6/16
to Aurelius
Thanks...it works !!! :)

The solution was the CherryPick
Reply all
Reply to author
Forward
0 new messages