*ArangoDB版本:3.8
*存储引擎:
*部署模式:单一服务器
*部署策略:手动启动
*操作系统:Ubuntu 20.04版
*计算机中的总RAM:32千兆位
*正在使用的磁盘:〈固态硬盘
***使用的 Package **:〈Ubuntu .deb
受影响的功能:阿兰戈进口
(base) raphy@pc:~$ arangodb
2021-11-04T09:34:45+01:00 |INFO| Starting arangodb version 0.15.3, build 814f8be component=arangodb
2021-11-04T09:34:45+01:00 |INFO| Using storage engine 'rocksdb' component=arangodb
2021-11-04T09:34:45+01:00 |INFO| Serving as master with ID 'ef664d42' on :8528... component=arangodb
2021-11-04T09:34:45+01:00 |INFO| Waiting for 3 servers to show up.
component=arangodb
2021-11-04T09:34:45+01:00 |INFO| Use the following commands to start other servers: component=arangodb
arangodb --starter.data-dir=./db2 --starter.join 127.0.0.1
arangodb --starter.data-dir=./db3 --starter.join 127.0.0.1
2021-11-04T09:34:45+01:00 |INFO| ArangoDB Starter listening on 0.0.0.0:8528 (:8528) component=arangodb
我试图以这种方式import
数据:
(base) raphy@pc:~$ arangoimport --server.database "ConceptNet" --collection "rel_type" "./ConceptNet/conceptnet.jsonl"
但我得到这些错误:
Connected to ArangoDB 'http+tcp://127.0.0.1:8529, version: 3.8.2, database: 'ConceptNet', username: 'root'
----------------------------------------
database: ConceptNet
collection: rel_type
create: no
create database: no
source filename: ./ConceptNet/conceptnet.jsonl
file type: json
threads: 2
on duplicate: error
connect timeout: 5
request timeout: 1200
----------------------------------------
Starting JSON import...
2021-11-04T14:49:48Z [165643] INFO [9ddf3] {general} processed 1945 bytes (3%) of input file
2021-11-04T14:49:48Z [165643] WARNING [e5a29] {general} at position 0: creating document failed with error 'edge attribute missing or invalid', offending document: {"_from":"pm","_to":"am","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/fr","process":"/s/process/wikiparsec/2"}}
2021-11-04T14:49:48Z [165643] WARNING [e5a29] {general} at position 1: creating document failed with error 'edge attribute missing or invalid', offending document: {"_from":"red","_to":"amber","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"}}
2021-11-04T14:49:48Z [165643] WARNING [e5a29] {general} at position 2: creating document failed with error 'edge attribute missing or invalid', offending document: {"_from":"proprium","_to":"apelativum","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"}}
2021-11-04T14:49:48Z [165643] WARNING [e5a29] {general} at position 3: creating document failed with error 'edge attribute missing or invalid', offending document: {"_from":"s","_to":"beze\t","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"}}
2021-11-04T14:49:48Z [165643] WARNING [e5a29] {general} at position 4: creating document failed with error 'edge attribute missing or invalid', offending document: {"_from":"euphoria","_to":"bad_trip","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"}}
2021-11-04T14:49:48Z [165643] WARNING [e5a29] {general} at position 5: creating document failed with error 'edge attribute missing or invalid', offending document: {"_from":"gooder","_to":"badder","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"}}
2021-11-04T14:49:48Z [165643] WARNING [e5a29] {general} at position 6: creating document failed with error 'edge attribute missing or invalid', offending document: {"_from":"goodest","_to":"baddest","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"}}
2021-11-04T14:49:48Z [165643] WARNING [e5a29] {general} at position 7: creating document failed with error 'edge attribute missing or invalid', offending document: {"_from":"goodie","_to":"baddie","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2","contributor":"/s/resource/wiktionary/fr"}}
2021-11-04T14:49:48Z [165643] WARNING [e5a29] {general} at position 8: creating document failed with error 'edge attribute missing or invalid', offending document: {"_from":"windy","_to":"calm","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"}}
2021-11-04T14:49:48Z [165643] WARNING [e5a29] {general} at position 9: creating document failed with error 'edge attribute missing or invalid', offending document: {"_from":"anger","_to":"calm_down","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/fr","process":"/s/process/wikiparsec/2"}}
2021-11-04T14:49:48Z [165643] WARNING [e5a29] {general} at position 10: creating document failed with error 'edge attribute missing or invalid', offending document: {"_from":"get_angry","_to":"calm_down","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/fr","process":"/s/process/wikiparsec/2"}}
created: 0
warnings/errors: 11
updated/replaced: 0
ignored: 0
这是我尝试导入的jsonl
文件:conceptnet.jsonl
:
{"_from":"pm","_to":"am","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/fr","process":"/s/process/wikiparsec/2"}}
{"_from":"red","_to":"amber","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"}}
{"_from":"proprium","_to":"apelativum","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"}}
{"_from":"s","_to":"beze\t","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"}}
{"_from":"euphoria","_to":"bad_trip","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"}}
{"_from":"gooder","_to":"badder","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"}}
{"_from":"goodest","_to":"baddest","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"}}
{"_from":"goodie","_to":"baddie","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2","contributor":"/s/resource>
{"_from":"windy","_to":"calm","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/en","process":"/s/process/wikiparsec/2"}}
{"_from":"anger","_to":"calm_down","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/fr","process":"/s/process/wikiparsec/2"}}
{"_from":"get_angry","_to":"calm_down","rel":{"rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/fr","process":"/s/process/wikiparsec/2"}}
我尝试修改jsonl
文件中的行,如下所示:
{"_from":"pm","_to":"am","rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/fr","process":"/s/process/wikiparsec/2"}
但还是得到这样的错误:
(base) raphy@pc:~$ arangoimport --server.database "ConceptNet" --collection "rel_type" "./ConceptNet/conceptnet.jsonl"
Please specify a password:
Connected to ArangoDB 'http+tcp://127.0.0.1:8529, version: 3.8.2, database: 'ConceptNet', username: 'root'
----------------------------------------
database: ConceptNet
collection: rel_type
create: no
create database: no
source filename: ./ConceptNet/conceptnet.jsonl
file type: json
threads: 2
on duplicate: error
connect timeout: 5
request timeout: 1200
----------------------------------------
Starting JSON import...
2021-11-04T18:48:55Z [37684] WARNING [e5a29] {general} at position 0: creating document failed with error 'edge attribute missing or invalid', offending document: {"_from":"pm","_to":"am","rel_type":"Antonym","language":"en","license":"-sa/4.0","sources":"/s/resource/wiktionary/fr","process":"/s/process/wikiparsec/2"}
我做错了什么或遗漏了什么?如何解决问题?
1条答案
按热度按时间lrl1mhuk1#
我发现将文档保存到
jsonl
文件中,如下所示,可以解决这个问题:conceptnet.jsonl
: