- nebula 版本:nebula-graphd version: 3.3.0
- 部署方式:分布式
- 安装方式:源码编译
- 是否为线上版本:Y
- 硬件信息
- 磁盘 HDD
- CPU 1 core/processor, Intel Xeon Processor
- 内存 3.8G
- 问题的具体描述
按照文档https://docs.nebula-graph.com.cn/3.1.0/nebula-importer/use-importer/描述配置importer的相关配置文件,按照v3格式配置:
version: v3
description: yaml file for snb data
removeTempFiles: false
clientSettings:
retry: 0
concurrency: 10 # number of graph clients
channelBufferSize: 128
space: snb
connection:
user: root
password: nebula
address: xxx.xxx.xxx.xxx:9669,xxx.xxx.xxx.xxx:9669,xxx.xxx.xxx.xxx:9669
postStart:
commands: |
DROP SPACE IF EXISTS snb;
CREATE SPACE IF NOT EXISTS snb(partition_num=15, replica_factor=1, vid_type=FIXED_STRING(20));
USE snb;
CREATE TAG comment(creationDate DateTime, locationIP String, browserUsed String, content String, length INT);
CREATE TAG forum(title String, creationDate DateTime);
CREATE TAG person(firstName String, lastName String, gender String, birthday Date, creationDate DateTime, locationIP String, browserUsed String, language String, email String);
CREATE TAG post(imageFile String, creationDate DateTime, locationIP String, browserUsed String, language String, content String, length INT);
CREATE TAG organisation(type String, name String, url String);
CREATE TAG place(name String, url String, type String);
CREATE TAG `tag`(name String, url String);
CREATE TAG tagclass(name String, url String);
CREATE EDGE IF NOT EXISTS comment_hasCreator_person();
CREATE EDGE IF NOT EXISTS comment_hasTag_tag();
CREATE EDGE IF NOT EXISTS comment_isLocatedIn_place();
CREATE EDGE IF NOT EXISTS comment_replyOf_comment();
CREATE EDGE IF NOT EXISTS comment_replyOf_post();
CREATE EDGE IF NOT EXISTS forum_containerOf_post();
CREATE EDGE IF NOT EXISTS forum_hasMember_person(joinDate DateTime);
CREATE EDGE IF NOT EXISTS forum_hasModerator_person();
CREATE EDGE IF NOT EXISTS forum_hasTag_tag();
CREATE EDGE IF NOT EXISTS person_hasInterest_tag();
CREATE EDGE IF NOT EXISTS person_isLocatedIn_place();
CREATE EDGE IF NOT EXISTS person_knows_person(creationDate DateTime);
CREATE EDGE IF NOT EXISTS person_likes_comment(creationDate DateTime);
CREATE EDGE IF NOT EXISTS person_likes_post(creationDate DateTime);
CREATE EDGE IF NOT EXISTS person_studyAt_organisation(classYear int);
CREATE EDGE IF NOT EXISTS person_workAt_organisation(workFrom int);
CREATE EDGE IF NOT EXISTS post_hasCreator_person();
CREATE EDGE IF NOT EXISTS post_hasTag_tag();
CREATE EDGE IF NOT EXISTS post_isLocatedIn_place();
CREATE EDGE IF NOT EXISTS organisation_isLocatedIn_place();
CREATE EDGE IF NOT EXISTS place_isPartOf_place();
CREATE EDGE IF NOT EXISTS tag_hasType_tagclass();
CREATE EDGE IF NOT EXISTS tagclass_isSubclassOf_tagclass();
afterPeriod: 8s
preStop:
commands: |
logPath: ./err/test.log
files:
- path: ./test-data/comment_0_0.csv
failDataPath: ./error/comment_error.csv
batchSize: 10
limit: 20
inOrder: false
type: csv
csv:
withHeader: false
withLabel: false
delimiter: "|"
schema:
type: vertex
vertex:
vid:
index: 0
type: string
tags:
- name: comment
props:
- name: creationDate
type: DateTime
index: 1
- name: locationIP
type: string
index: 2
- name: browserUsed
type: string
index: 3
- name: content
type: string
index: 4
- name: length
type: int
index: 5
导入的数据格式为如下:
id|creationDate|locationIP|browserUsed|content|length
1236950581249|2011-08-17T14:26:59.961+0000|92.39.58.88|Chrome|yes|3
1236950581250|2011-08-17T11:10:21.570+0000|213.55.127.9|Internet Explorer|thanks|6
2061584302085|2012-07-20T05:22:51.283+0000|213.55.127.9|Internet Explorer|LOL|3
2061584302086|2012-07-20T16:55:45.373+0000|213.55.127.9|Internet Explorer|I see|5
2061584302087|2012-07-20T04:34:17.500+0000|213.55.127.9|Internet Explorer|fine|4
2061584302088|2012-07-20T17:35:11.096+0000|92.39.58.88|Chrome|right|5
备注:数据格式的表头只是为了详细说明才添加,在实际的过程中没有。
配置完毕后执行如下命令:
./importer --config /opt/nebula-importer/snb.yaml
- 报错信息如下:
2022/12/14 21:07:52 [INFO] reader.go:184: Total lines of file(/opt/nebula-importer/test-data/comment_0_0.csv) is: 20, error lines: 0
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6e8939]
goroutine 35 [running]:
github.com/vesoft-inc/nebula-importer/pkg/client.(*ClientPool).startWorker(0xc0001c0200, 0xa)
/opt/nebula-importer/pkg/client/clientpool.go:187 +0x299
github.com/vesoft-inc/nebula-importer/pkg/client.(*ClientPool).Init.func1(0x0?)
/opt/nebula-importer/pkg/client/clientpool.go:149 +0x25
created by github.com/vesoft-inc/nebula-importer/pkg/client.(*ClientPool).Init
/opt/nebula-importer/pkg/client/clientpool.go:148 +0x152
所有的信息都核对过,但是始终显示空指针或者内存地址错误,实在不明白哪里出问题,请赐教,万分感谢。