通过spark-connector批量导出数据,报连接超时

已经获取到边表的schema信息,

2021-12-15 11:27:12,908 INFO NebulaDataSourceEdgeReader: dataset's schema: StructType(StructField(_srcId,StringType,false), StructField(_dstId,StringType,false), StructField(_rank,LongType,false), StructField(eventcode,StringType,true), StructField(latest,StringType,true), StructField(Rank,StringType,true))

然后读取数据时报错,如下:

2021-12-15 11:27:13,416 INFO NebulaDataSource: create reader
2021-12-15 11:27:13,416 INFO NebulaDataSource: options {spacename=hitch, nocolumn=false, metaaddress=10.111.227.11:9559,10.111.227.12:9559,10.111.97.3:9559, label=relation, type=edge, connectionretry=3, timeout=300000, executionretry=2, paths=[], limit=1000, returncols=eventcode,latest,Rank, partitionnumber=50}
2021-12-15 11:27:13,420 INFO DataSourceV2Strategy: 
Pushing operators to class com.vesoft.nebula.connector.NebulaDataSource
Pushed Filters: 
Post-Scan Filters: 
Output: _srcId#0, _dstId#1, _rank#2L, eventcode#3, latest#4, Rank#5
         
Exception in thread "main" com.facebook.thrift.transport.TTransportException: java.net.SocketTimeoutException: connect timed out
	at com.facebook.thrift.transport.TSocket.open(TSocket.java:175)
	at com.vesoft.nebula.client.meta.MetaClient.getClient(MetaClient.java:104)
	at com.vesoft.nebula.client.meta.MetaClient.doConnect(MetaClient.java:99)
	at com.vesoft.nebula.client.meta.MetaClient.connect(MetaClient.java:89)
	at com.vesoft.nebula.connector.nebula.MetaProvider.<init>(MetaProvider.scala:22)
	at com.vesoft.nebula.connector.reader.NebulaSourceReader.getSchema(NebulaSourceReader.scala:45)
	at com.vesoft.nebula.connector.reader.NebulaSourceReader.getSchema(NebulaSourceReader.scala:36)
	at com.vesoft.nebula.connector.reader.NebulaDataSourceEdgeReader$$anonfun$2.apply(NebulaSourceReader.scala:121)
	at com.vesoft.nebula.connector.reader.NebulaDataSourceEdgeReader$$anonfun$2.apply(NebulaSourceReader.scala:120)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
	at scala.collection.immutable.Range.foreach(Range.scala:160)
	at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
	at scala.collection.AbstractTraversable.map(Traversable.scala:104)
	at com.vesoft.nebula.connector.reader.NebulaDataSourceEdgeReader.planInputPartitions(NebulaSourceReader.scala:120)

连接超时了,你吧 Nebula 的版本号还有 Spark Connector 的版本号补充下,然后补充下你的配置代码

版本号2.5.1,Spark Connector版本号com.vesoft
nebula-spark-connector
2.5.1,
配置需要哪些配置,spark任务的配置 机器配置 还是服务的配置?

任务和服务配置

spark任务:
–deploy-mode client --num-executors 100 --executor-memory 5g --driver-memory 10g --executor-cores 4
服务配置:
3台机器,每台机器meta graph storage服务都有,配置除了ip外,基本默认

@steam 请问ReadNebulaConfig .withLimit(2000).withPartitionNum(10) 这个参数值设的稍大一些,程序就报超时,请问这两个参数与server的什么配置相关,可以调大?

limit和partitionNum和超时没关系的,提示的超时是某些executor进行 meta client连接的时候发生的,你看下spark每个节点和nebula meta服务网络互通是不是好的

limit和partitionNum 与server的什么配置相关,可以调大? @nicole

没有相关配置, 你看下文档这两个参数的含义。

那为何在spark任务参数不变的情况下,如果limit和partitionNum参数值调小,任务就可以跑;如果参数值调大,任务就失败呢? @nicole 这一点没想明白

你先确认下这个?通过spark-connector批量导出数据,报连接超时 - #7,来自 nicole
如果失败报错的都是你上面贴出来的 meta 服务连接超时,那就要看下是不是调大这两个值导致storage压力大, meta和storage服务异常了




当前任务设置.withLimit(2000).withPartitionNum(50),负载见截图,当.withLimit(1000).withPartitionNum(5)时任务可以运行
@nicole @steam 大佬能帮忙解答一下么?