测试方法命名风格改为驼峰;

更新文档
This commit is contained in:
FuYouJ 2023-07-07 21:01:38 +08:00
parent cc90994e17
commit 7e302fcd1b
2 changed files with 12 additions and 10 deletions

View File

@ -47,6 +47,7 @@ LOCAL_DATE,
LOCAL_TIME,
LOCAL_DATE_TIME,
LIST,
//map类型支持 . 属性表达式取值
MAP,
CHAR_ARRAY,
BYTE_ARRAY,
@ -169,9 +170,10 @@ Object_ARRAY
## 注意事项
* properties的定义的顺序需要与源端一一对应但数量不必要对齐neo4j writer 会取最小值。如果源端的数据列少于neo4j字段怎么办建议将源端数据加工成json格式在neo4j端将数据类型设置成map。在cypher中可以根据jsonpath语法一直取值。比如 unwind $batch as row create (p) set p.name = row.properties.name,set p.age = row.properties.age
* 如果提示事务超时建议调大事务运行时间或者调小batch_size
* 如果用于更新场景,会遇到死锁问题,建议二开源码加入死锁异常检测,并进行重试,开源版本不提供此功能。
* properties定义的顺序需要与reader端顺序一一对应。
* 灵活使用map类型可以免去很多数据加工的烦恼。在cypher中可以根据 . 属性访问符号一直取值。比如 unwind $batch as row create (p) set p.name = row.prop.name,set p.age = row.prop.age在这个例子中prop是map类型包含name和age两个属性。
* 如果提示事务超时建议调大事务运行时间或者调小batchSize
* 如果用于更新场景,遇到死锁问题影响写入,建议二开源码加入死锁异常检测,并进行重试。
## 性能报告
@ -185,7 +187,7 @@ Object_ARRAY
**datax 配置**
Channel 20 batchsize = 1000
任务平均流量15.23MB/s
记录写入速度44440 rec/s
读出记录总数2222013
* Channel 20 batchsize = 1000
* 任务平均流量15.23MB/s
* 记录写入速度44440 rec/s
* 读出记录总数2222013

View File

@ -87,7 +87,7 @@ public class Neo4jWriterTest {
}
@Test
public void test_create_node_all_type_field() {
public void testCreateNodeAllTypeField() {
final Result checkExists = neo4jSession.run("MATCH (p:Person) RETURN p limit 1");
if (checkExists.hasNext()) {
neo4jSession.run("MATCH (p:Person) delete p");
@ -128,7 +128,7 @@ public class Neo4jWriterTest {
* 所以先创建节点再模拟关系
*/
@Test
public void test_create_relation() {
public void testCreateRelation() {
final Result checkExists = neo4jSession.run("MATCH (p1:Person)-[r:LINK]->(p1:Person) return r limit 1");
if (checkExists.hasNext()) {
neo4jSession.run("MATCH (p1:Person)-[r:LINK]->(p1:Person) delete r,p1,p2");
@ -179,7 +179,7 @@ public class Neo4jWriterTest {
* neo4j中,Label和关系类型,想动态的写需要借助于apoc函数
*/
@Test
public void test_use_apoc_create_dynamic_label() {
public void testUseApocCreateDynamicLabel() {
List<String> dynamicLabel = new ArrayList<>();
for (int i = 0; i < MOCK_NUM; i++) {
dynamicLabel.add("Label" + i);