Neo4j-开发备忘

  • Neo4j version : 3.3.0
  • 性能问题

Neo4j-开发备忘_第1张图片
image.png

批量CSV文件导入时,发现neo4j只使用了一个核,official也没有关于CPU调优的说法,待填坑。

  • 批量CSV数据导入文件路径被篡改问题

提交csv文件加载入库的过程中,发现包含正确路径的Cql语句在被neo4j 提取时,原路径被莫名的添加了一段绝对路径。
Input:

LOAD CSV WITH HEADERS FROM 'file:/tmp/.csv' 
AS line CREATE (: { :line., :line.})

Outputs

[T]  2018-05-08 12:19:44 999 neo4j_jober.go:104 
&{[{Neo.ClientError.Statement.ExternalResourceFailed Couldn't load the external resource at:
file:/data/neo4j/import/tmp/.csv }] [] 0}
Solution

编辑neo4j.conf,将其中

 19 # This setting constrains all `LOAD CSV` import files to be under the `import` directory. Remove or comment it out to
 20 # allow files to be loaded from anywhere in the filesystem; this introduces possible security problems. See the
 21 # `LOAD CSV` section of the manual for details.
 22 dbms.directories.import=/var/lib/neo4j/import

dbms.directories.import注释即可

你可能感兴趣的:(Neo4j-开发备忘)