微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

JanusGraph BulkLoad报告NoSuchElement错误,已加载节点但没有边缘

如何解决JanusGraph BulkLoad报告NoSuchElement错误,已加载节点但没有边缘

我正在研究在JanusGraph中加载csv的方法。我尝试了官方文档中给出的令人不快的例子,它工作得很好。方法如下:

hadoop-load-csv.properties

gremlin.graph=org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph
gremlin.hadoop.graphReader=org.apache.tinkerpop.gremlin.hadoop.structure.io.script.ScriptInputFormat
gremlin.hadoop.scriptInputFormat.script=./data/script-input-grateful-dead.groovy
gremlin.hadoop.inputLocation=./data/grateful-dead.txt

gremlin.hadoop.graphWriter=org.apache.hadoop.mapreduce.lib.output.NullOutputFormat
gremlin.hadoop.graphOutputFormat=org.apache.hadoop.mapreduce.lib.output.NullOutputFormat
gremlin.hadoop.outputLocation=output
gremlin.hadoop.jarsIndistributedCache=true

janusgraph-grateful.properties

gremlin.graph=org.janusgraph.core.JanusGraphFactory
storage.hbase.table=grateful
storage.hostname=

run.groovy

outputGraphConfig = [path to janusgraph-grateful.properties]
:load ./data/grateful-dead-jansugraph-schema.groovy
graph = JanusGraphFactory.open(outputGraphConfig)
defineGratefulDeadSchema(graph)
graph.close()

readGraph = GraphFactory.open([path to hadoop-load-csv.properties])

blvp = BulkLoaderVertexProgram.build().writeGraph(outputGraphConfig).create(readGraph)
readGraph.compute(SparkGraphComputer).program(blvp).submit().get()
g = GraphFactory.open(outputGraphConfig).traversal()
g.V().count()
g.E().count()

此后,我删除了整个图,对数据进行了二次采样,然后再次加载,但失败了。

1,song,hey BO DIDDLEY,cover,5   followedBy,2,1|followedBy,3,2|followedBy,4,5,6,1  
2,IM A MAN,1     followedBy,1,1
3,NOT FADE AWAY,531  followedBy,572    followedBy,40|followedBy,2
4,BERTHA,original,394  followedBy,10,4 followedBy,1
5,GOING DOWN THE ROAD FEELING BAD,293        
6,MONA,1 sungBy,3|writtenBy,5    followedBy,1
7,WHERE HAVE THE HEROES GONE,0    followedBy,8,1  followedBy,9,1
8,OH BOY,2   followedBy,7,1|sungBy,5|writtenBy,4   followedBy,1
800,WINING BOY BLUES,1   sungBy,4    
9,HERE COMES SUNSHINE,65  followedBy,1 followedBy,2  
10,65     

我遇到了 NoSuchElement错误,当我查看图表时,g.V().count()返回10,而g.E().count()返回0。 有人知道发生了什么吗?请给我一些建议。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。