使用DSE 4.7.1设置tinkerpop火花图计算机

时间:2015-12-15 14:06:43

标签: cassandra datastax-enterprise titan tinkerpop

我试图使用带有titan 1.0和tinkerpop 3.0.1的火花图计算机进行测试。

现在,如果我尝试以下步骤,则操作似乎与空图形一起使用。

sparkgraph = GraphFactory.open('conf/hadoop-graph/read-cassandra.properties')

gs = sparkgraph.traversal(computer(org.apache.tinkerpop.gremlin.hadoop.process.computer.spark.SparkGraphComputer))

gs.V().count()

结果如果为0.这是有道理的,因为它是空的。

但是如果我使用titan-cassandra-solr.properties字段创建并用一些数据填充它只是几个边和顶点然后重复上面的步骤我得到一个错误:

 org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 0.0 failed 1 times, most recent failure: Lost task 0.0 in stage 0.0 (TID 0, localhost): java.lang.RuntimeException: java.lang.IllegalArgumentException: Edge with id already exists: 143370
    at com.thinkaurelius.titan.hadoop.formats.util.TitanVertexDeserializer.readHadoopVertex(TitanVertexDeserializer.java:181)
    at com.thinkaurelius.titan.hadoop.formats.util.GiraphRecordReader.nextKeyValue(GiraphRecordReader.java:46)
    at org.apache.spark.rdd.NewHadoopRDD$$anon$1.hasNext(NewHadoopRDD.scala:145)
    at org.apache.spark.InterruptibleIterator.hasNext(InterruptibleIterator.scala:39)
    at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:327)
    at org.apache.spark.util.collection.ExternalSorter.insertAll(ExternalSorter.scala:202)
    at org.apache.spark.shuffle.sort.SortShuffleWriter.write(SortShuffleWriter.scala:56)
    at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:68)
    at org.apache.spark.scheduler.ShuffleMapTask.runTask(ShuffleMapTask.scala:41)
    at org.apache.spark.scheduler.Task.run(Task.scala:56)
    at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:200)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: Edge with id already exists: 143370
    at org.apache.tinkerpop.gremlin.structure.Graph$Exceptions.edgeWithIdAlreadyExists(Graph.java:1093)
    at org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerHelper.addEdge(TinkerHelper.java:57)
    at org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerVertex.addEdge(TinkerVertex.java:127)
    at com.thinkaurelius.titan.hadoop.formats.util.TitanVertexDeserializer.readHadoopVertex(TitanVertexDeserializer.java:129)
    ... 13 more

我不明白为什么要尝试创造优势。通过使用titan-cassandra-solr.properties配置进行查询,无论如何我都看不到这个边缘。

如果我遗漏了太多细节,我很乐意更新这个问题。

1 个答案:

答案 0 :(得分:1)

我首先尝试使用相同的操作和最新版本的Titan和TinkerPop上的新图表,以防您遇到间接错误。 TinkerPop 3.1.1已经有点了。如果这不起作用,我甚至会尝试构建Titan分支和TinkerPop最新分支,以排除间接错误。