64 lines
984 B
Plaintext
64 lines
984 B
Plaintext
|
|
/*
|
||
|
|
Script to create a distributed property graph for the dblp dataset.
|
||
|
|
|
||
|
|
Part 2
|
||
|
|
|
||
|
|
This part can be executed repeatedly. Run with SecondoTTBDB. Monitors must be running.
|
||
|
|
|
||
|
|
|
||
|
|
1 Set up Pregel
|
||
|
|
|
||
|
|
|
||
|
|
*/
|
||
|
|
|
||
|
|
query setupPregel(Workers);
|
||
|
|
|
||
|
|
let ResultsM = Results feed head[0] mconsumeflob;
|
||
|
|
|
||
|
|
query remotePregelCommand('let ResultsM = Results feed head[0] mconsumeflob')
|
||
|
|
|
||
|
|
query setPregelFunction(Compute, Partition);
|
||
|
|
|
||
|
|
#
|
||
|
|
|
||
|
|
|
||
|
|
/*
|
||
|
|
2 Computation
|
||
|
|
|
||
|
|
Initialize Pregel messages and ~ResultsM~ relation
|
||
|
|
|
||
|
|
*/
|
||
|
|
|
||
|
|
query InitialMessages feed initPregelMessages;
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
/*
|
||
|
|
Repeat several times:
|
||
|
|
|
||
|
|
*/
|
||
|
|
|
||
|
|
query startPregel(1);
|
||
|
|
|
||
|
|
query getPregelMessages() count;
|
||
|
|
|
||
|
|
query getPregelMessages() consume;
|
||
|
|
|
||
|
|
/*
|
||
|
|
When there are no more messages, look at the results:
|
||
|
|
|
||
|
|
*/
|
||
|
|
|
||
|
|
query remotePregelCommand('update Results := ResultsM mfeed consume')
|
||
|
|
|
||
|
|
query createSDArray("Results", Workers) dsummarize consume;
|
||
|
|
|
||
|
|
/*
|
||
|
|
To make the result storage empty again:
|
||
|
|
|
||
|
|
*/
|
||
|
|
query createSDArray("Results", Workers) dmap["", . feed . deletedirect count] getValue
|
||
|
|
|
||
|
|
|
||
|
|
|