带有SparkComputer的JanusGraph抛出异常:GetNewApplicationRequestProto无法强制转换为com.google.protobuf.Message

时间:2018-04-09 01:05:13

标签: apache-spark yarn tinkerpop janusgraph

当我使用JanusGraph2.0并在纱线上点火时,例如:

gremlin> graph = GraphFactory.open('conf/hadoop-graph/hadoop-load.properties')
==>hadoopgraph[gryoinputformat->nulloutputformat]
gremlin> blvp = BulkLoaderVertexProgram.build().writeGraph('conf/janusgraph-cassandra.properties').create(graph)
==>BulkLoaderVertexProgram[bulkLoader=IncrementalBulkLoader,vertexIdProperty=bulkLoader.vertex.id,userSuppliedIds=false,keepOriginalIds=true,batchSize=0]
gremlin> graph.compute(SparkGraphComputer).program(blvp).submit().get()

它引发了异常:

08:57:03 ERROR org.apache.spark.SparkContext  - Error initializing SparkContext.
java.lang.ClassCastException: org.apache.hadoop.yarn.proto.YarnServiceProtos$GetNewApplicationRequestProto cannot be cast to com.google.protobuf.Message
	at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:226)
	at com.sun.proxy.$Proxy23.getNewApplication(Unknown Source)

任何人都可以帮我解决这个问题吗? THX

1 个答案:

答案 0 :(得分:0)

这个问题在janusgraph-users中交叉发布并在那里回答。

  

检查版本兼容性矩阵。 JanusGraph 0.2.0与Spark 2.11不兼容。 http://docs.janusgraph.org/latest/version-compat.html

使用Spark 1.6.1编译/测试JanusGraph 0.2.0。确保对齐版本。