1
0
Fork 0
arangodb/arangod/Pregel
Jan 8b7400a36a cppcheck (#6856) 2018-10-12 12:40:31 +02:00
..
Algos remove tabstops 2018-07-16 15:00:12 +02:00
examples
Aggregator.h
AggregatorHandler.cpp
AggregatorHandler.h
AlgoRegistry.cpp backport: use vocbase reference instead of pointer in arangodb::pregel::GraphStore 2018-04-13 11:23:34 +03:00
AlgoRegistry.h backport: use vocbase reference instead of pointer in arangodb::pregel::GraphStore 2018-04-13 11:23:34 +03:00
Algorithm.h Seeded pagerank (#5491) 2018-06-08 16:44:23 +02:00
CommonFormats.h
Conductor.cpp Feature/remove job queue thread (#5986) 2018-08-10 12:17:43 +02:00
Conductor.h Converting Pregel AQL function to c++ and fixing a bug (#5620) 2018-06-28 10:46:16 +02:00
Graph.h fixed minor several compiler complaints (#5406) 2018-05-23 11:50:00 +02:00
GraphFormat.h Seeded pagerank (#5491) 2018-06-08 16:44:23 +02:00
GraphSerializer.h
GraphStore.cpp cppcheck (#6856) 2018-10-12 12:40:31 +02:00
GraphStore.h Fix Pregel Graph Loading Logic (#6418) 2018-09-07 14:04:25 +02:00
IncomingCache.cpp
IncomingCache.h Bug fix/remove most of aql js (#5223) 2018-04-30 11:17:11 +02:00
Iterators.h
MasterContext.h Using asio::io_context::strands instead of locks (#5266) 2018-05-07 15:58:19 +02:00
MessageCombiner.h add missing override specifiers, add final specifiers 2018-05-04 09:01:50 +02:00
MessageFormat.h
OutgoingCache.cpp
OutgoingCache.h Bug fix/remove most of aql js (#5223) 2018-04-30 11:17:11 +02:00
PregelFeature.cpp Fix Pregel Graph Loading Logic (#6418) 2018-09-07 14:04:25 +02:00
PregelFeature.h issue 427.5: use ApplicationServer reference instead of pointer (#6145) 2018-08-15 12:16:02 +03:00
README.md
Recovery.cpp Feature/remove job queue thread (#5986) 2018-08-10 12:17:43 +02:00
Recovery.h
Statistics.h
TypedBuffer.h Feature/misc spelling corrections (#5164) 2018-07-13 13:06:20 +02:00
Utils.cpp Bug fix/wenn der shard mann 2mal klingelt (#5890) 2018-07-26 15:37:40 +02:00
Utils.h
VertexComputation.h
Worker-templates-algorithms.cpp
Worker-templates-native-types.cpp
Worker.cpp Feature/remove job queue thread (#5986) 2018-08-10 12:17:43 +02:00
Worker.h Converting Pregel AQL function to c++ and fixing a bug (#5620) 2018-06-28 10:46:16 +02:00
WorkerConfig.cpp
WorkerConfig.h
WorkerContext.h Bug fix/remove most of aql js (#5223) 2018-04-30 11:17:11 +02:00

README.md

ArangoDB-Logo

Pregel Subsystem

The pregel subsystem implements a variety of different grapg algorithms, this readme is more intended for internal use.

Protocol

Message format between DBServers:

{sender:"someid", executionNumber:1337, globalSuperstep:123, messages: [, , vertexID2, ] } Any type of slice is supported

Useful Commands

Import graph e.g. https://github.com/arangodb/example-datasets/tree/master/Graphs/1000 First rename the columns '_key', '_from', '_to' arangoimport will keep those.

In arangosh:

db._create('vertices', {numberOfShards: 2});
db._createEdgeCollection('alt_edges');
db._createEdgeCollection('edges', {numberOfShards: 2, shardKeys:["_vertex"], distributeShardsLike:'vertices'});

arangoimport --file generated_vertices.csv --type csv --collection vertices --overwrite true --server.endpoint http+tcp://127.0.0.1:8530

Or: for(var i=0; i < 5000; i++) db.vertices.save({_key:i+""});

arangoimport --file generated_edges.csv --type csv --collection alt_edges --overwrite true --from-collection-prefix "vertices" --to-collection-prefix "vertices" --convert false --server.endpoint http+tcp://127.0.0.1:8530

AQL script to copy edge collection into one with '_vertex':

FOR doc IN alt_edges INSERT {_vertex:SUBSTRING(doc._from,FIND_FIRST(doc._from,"/")+1), _from:doc._from, _to:doc._to} IN edges LET values = ( FOR s IN vertices RETURN s.result ) RETURN SUM(values)

AWK Scripts

Make CSV file with IDs unique cat edges.csv | tr '[:space:]' '[\n*]' | grep -v "^\s*$" | awk '!seen[$0]++' > vertices.csv

Make CSV file with arango compatible edges

cat edges.csv | awk -F" " '{print "profiles/" $1 "\tprofiles/" $2 "\t" $1}' >> arango-edges.csv

arangoimport --file vertices.csv --type csv --collection twitter_v --overwrite true --convert false --server.endpoint http+tcp://127.0.0.1:8530 -c none arangoimport --file arango-edges.csv --type csv --collection twitter_e --overwrite true --convert false --separator "\t" --server.endpoint http+tcp://127.0.0.1:8530 -c none