Compare commits
3 Commits
bf447497fc
...
4321554650
| Author | SHA1 | Date | |
|---|---|---|---|
| 4321554650 | |||
| d2ea109139 | |||
| babcf04b91 |
|
|
@ -26,7 +26,7 @@ log:
|
|||
console: true
|
||||
|
||||
sources:
|
||||
- path: /data/y4/tools/data/user-0s.csv
|
||||
- path: /data/y4/tools/data/users-0.csv
|
||||
csv:
|
||||
delimiter: "|"
|
||||
withHeader: true
|
||||
|
|
@ -86,7 +86,7 @@ sources:
|
|||
type: "STRING"
|
||||
index: 16
|
||||
|
||||
- path: /data/y4/tools/data/post-0s.csv
|
||||
- path: /data/y4/tools/data/posts-0.csv
|
||||
csv:
|
||||
delimiter: "|"
|
||||
withHeader: true
|
||||
|
|
@ -140,7 +140,7 @@ sources:
|
|||
type: "INT"
|
||||
index: 14
|
||||
|
||||
- path: /data/y4/tools/data/group-0s.csv
|
||||
- path: /data/y4/tools/data/groups-0.csv
|
||||
csv:
|
||||
delimiter: "|"
|
||||
withHeader: true
|
||||
|
|
@ -161,7 +161,7 @@ sources:
|
|||
type: "STRING"
|
||||
index: 3
|
||||
|
||||
- path: /data/y4/tools/data/organization-0s.csv
|
||||
- path: /data/y4/tools/data/organizations-0.csv
|
||||
csv:
|
||||
delimiter: "|"
|
||||
withHeader: true
|
||||
|
|
@ -185,7 +185,7 @@ sources:
|
|||
type: "STRING"
|
||||
index: 4
|
||||
|
||||
- path: /data/y4/tools/data/task-0s.csv
|
||||
- path: /data/y4/tools/data/tasks-0.csv
|
||||
csv:
|
||||
delimiter: "|"
|
||||
withHeader: true
|
||||
|
|
@ -284,25 +284,25 @@ sources:
|
|||
type: "STRING"
|
||||
index: 0
|
||||
|
||||
# - path: /data/y4/tools/data/post_repost_post-0.csv
|
||||
# csv:
|
||||
# delimiter: "|"
|
||||
# withHeader: true
|
||||
# edges:
|
||||
# - name: post_repost_post
|
||||
# mode: INSERT
|
||||
# src:
|
||||
# id:
|
||||
# type: "STRING"
|
||||
# index: 2 # src
|
||||
# dst:
|
||||
# id:
|
||||
# type: "STRING"
|
||||
# index: 1 # dst
|
||||
# props:
|
||||
# - name: "extra_prop"
|
||||
# type: "STRING"
|
||||
# index: 0
|
||||
- path: /data/y4/tools/data/post_repost_post-0.csv
|
||||
csv:
|
||||
delimiter: "|"
|
||||
withHeader: true
|
||||
edges:
|
||||
- name: post_repost_post
|
||||
mode: INSERT
|
||||
src:
|
||||
id:
|
||||
type: "STRING"
|
||||
index: 2 # src
|
||||
dst:
|
||||
id:
|
||||
type: "STRING"
|
||||
index: 1 # dst
|
||||
props:
|
||||
- name: "extra_prop"
|
||||
type: "STRING"
|
||||
index: 0
|
||||
|
||||
- path: /data/y4/tools/data/post_cite_post-0.csv
|
||||
csv:
|
||||
|
|
@ -324,25 +324,25 @@ sources:
|
|||
type: "STRING"
|
||||
index: 0
|
||||
|
||||
# - path: /data/y4/tools/data/user_post_post-0.csv
|
||||
# csv:
|
||||
# delimiter: "|"
|
||||
# withHeader: true
|
||||
# edges:
|
||||
# - name: user_post_post
|
||||
# mode: INSERT
|
||||
# src:
|
||||
# id:
|
||||
# type: "STRING"
|
||||
# index: 2 # src
|
||||
# dst:
|
||||
# id:
|
||||
# type: "STRING"
|
||||
# index: 1 # dst
|
||||
# props:
|
||||
# - name: "extra_prop"
|
||||
# type: "STRING"
|
||||
# index: 0
|
||||
- path: /data/y4/tools/data/user_post_post-0.csv
|
||||
csv:
|
||||
delimiter: "|"
|
||||
withHeader: true
|
||||
edges:
|
||||
- name: user_post_post
|
||||
mode: INSERT
|
||||
src:
|
||||
id:
|
||||
type: "STRING"
|
||||
index: 2 # src
|
||||
dst:
|
||||
id:
|
||||
type: "STRING"
|
||||
index: 1 # dst
|
||||
props:
|
||||
- name: "extra_prop"
|
||||
type: "STRING"
|
||||
index: 0
|
||||
|
||||
- path: /data/y4/tools/data/user_comment_user-0.csv
|
||||
csv:
|
||||
|
|
@ -544,22 +544,22 @@ sources:
|
|||
type: "STRING"
|
||||
index: 0
|
||||
|
||||
# - path: /data/y4/tools/data/user_join_organization-0.csv
|
||||
# csv:
|
||||
# delimiter: "|"
|
||||
# withHeader: true
|
||||
# edges:
|
||||
# - name: user_join_organization
|
||||
# mode: INSERT
|
||||
# src:
|
||||
# id:
|
||||
# type: "STRING"
|
||||
# index: 2 # src
|
||||
# dst:
|
||||
# id:
|
||||
# type: "STRING"
|
||||
# index: 1 # dst
|
||||
# props:
|
||||
# - name: "extra_prop"
|
||||
# type: "STRING"
|
||||
# index: 0
|
||||
- path: /data/y4/tools/data/user_join_organization-0.csv
|
||||
csv:
|
||||
delimiter: "|"
|
||||
withHeader: true
|
||||
edges:
|
||||
- name: user_join_organization
|
||||
mode: INSERT
|
||||
src:
|
||||
id:
|
||||
type: "STRING"
|
||||
index: 2 # src
|
||||
dst:
|
||||
id:
|
||||
type: "STRING"
|
||||
index: 1 # dst
|
||||
props:
|
||||
- name: "extra_prop"
|
||||
type: "STRING"
|
||||
index: 0
|
||||
|
|
@ -341,15 +341,23 @@ public class GeneratorTestData {
|
|||
int i = 0;
|
||||
List<String> edgeLists = Arrays.asList("post_in_task", "user_participate_task", "user_join_group", "user_join_organization");
|
||||
for (String src : srcList) {
|
||||
i++;
|
||||
if (i % 1000 == 0) {
|
||||
log.info("edge_type: {}-{}, {}",edgeType, count, i);
|
||||
}
|
||||
|
||||
List<String> dsts;
|
||||
if (i == 0 && !edgeLists.contains(edgeType)) {
|
||||
// 当索引等于0 时,选择 1000 个目标节点
|
||||
dsts = getRandomSample(dstList, 1000);
|
||||
log.info("super vertex id is {}; dst size is {}", src, dsts.size());
|
||||
} else if (i == 1 && !edgeLists.contains(edgeType)) {
|
||||
// 当索引等于0 时,选择 10001 个目标节点
|
||||
dsts = getRandomSample(dstList, 1500);
|
||||
log.info("ssuper vertex id is {}; dst size is {}", src, dsts.size());
|
||||
} else if (i == 2 && !edgeLists.contains(edgeType)) {
|
||||
// 当索引等于0 时,选择 10001 个目标节点
|
||||
dsts = getRandomSample(dstList, 10001);
|
||||
log.info("sssuper vertex id is {}; dst size is {}", src, dsts.size());
|
||||
} else {
|
||||
// 否则选择最多 num 个目标节点
|
||||
dsts = getRandomSample(dstList, Math.min(dstList.size(), num));
|
||||
|
|
@ -364,6 +372,7 @@ public class GeneratorTestData {
|
|||
edge.put("edge_type", edgeType);
|
||||
edges.add(edge);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return edges;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user