1
0
Fork 0
arangodb/arangod/Pregel
Frank Celler 4982ca6c3d class ManagedDocumentResult is not a struct 2019-06-06 12:05:31 +02:00
..
Algos Pregel segmented buffers (#9109) 2019-05-28 18:21:56 +02:00
examples
Aggregator.h big reformat 2018-12-26 00:57:05 +01:00
AggregatorHandler.cpp big reformat 2018-12-26 00:57:05 +01:00
AggregatorHandler.h big reformat 2018-12-26 00:57:05 +01:00
AlgoRegistry.cpp prevent PregelFeature from shutting down while its workers are running (#8627) 2019-03-29 18:22:37 +01:00
AlgoRegistry.h prevent PregelFeature from shutting down while its workers are running (#8627) 2019-03-29 18:22:37 +01:00
Algorithm.h big reformat 2018-12-26 00:57:05 +01:00
CommonFormats.h fix the pregel code (#8741) 2019-04-12 10:07:16 +02:00
Conductor.cpp add shardKeyAttribute to pregel start parameters (#9157) 2019-06-05 14:27:26 +02:00
Conductor.h Bug fix 3.4/pregel micro improvements (#9178) 2019-06-04 09:32:29 +02:00
Graph.h Pregel segmented buffers (#9109) 2019-05-28 18:21:56 +02:00
GraphFormat.h Pregel segmented buffers (#9109) 2019-05-28 18:21:56 +02:00
GraphSerializer.h big reformat 2018-12-26 00:57:05 +01:00
GraphStore.cpp Bug fix 3.4/pregel micro improvements (#9178) 2019-06-04 09:32:29 +02:00
GraphStore.h improve error message (#9155) 2019-06-03 17:06:44 +02:00
IncomingCache.cpp Pregel segmented buffers (#9109) 2019-05-28 18:21:56 +02:00
IncomingCache.h Pregel segmented buffers (#9109) 2019-05-28 18:21:56 +02:00
IndexHelpers.cpp Pregel segmented buffers (#9109) 2019-05-28 18:21:56 +02:00
IndexHelpers.h class ManagedDocumentResult is not a struct 2019-06-06 12:05:31 +02:00
Iterators.h add shardKeyAttribute to pregel start parameters (#9157) 2019-06-05 14:27:26 +02:00
MasterContext.h big reformat 2018-12-26 00:57:05 +01:00
MessageCombiner.h big reformat 2018-12-26 00:57:05 +01:00
MessageFormat.h big reformat 2018-12-26 00:57:05 +01:00
OutgoingCache.cpp Pregel segmented buffers (#9109) 2019-05-28 18:21:56 +02:00
OutgoingCache.h Pregel segmented buffers (#9109) 2019-05-28 18:21:56 +02:00
PregelFeature.cpp add shardKeyAttribute to pregel start parameters (#9157) 2019-06-05 14:27:26 +02:00
PregelFeature.h prevent PregelFeature from shutting down while its workers are running (#8627) 2019-03-29 18:22:37 +01:00
README.md Renamed arangoimp to arangoimport (with alias for compatibility.) (#4040) 2017-12-14 21:31:21 +01:00
Recovery.cpp Bug fix 3.4/scheduler empty reformat (#7872) 2019-01-08 20:39:42 +01:00
Recovery.h big reformat 2018-12-26 00:57:05 +01:00
Statistics.h big reformat 2018-12-26 00:57:05 +01:00
TypedBuffer.h fix for windows 2019-06-04 11:51:58 +02:00
Utils.cpp fix issues with pregel (#8948) 2019-05-09 18:58:27 +02:00
Utils.h Pregel various fixes (#8879) 2019-05-07 09:53:18 +02:00
VertexComputation.h Pregel segmented buffers (#9109) 2019-05-28 18:21:56 +02:00
Worker-templates-algorithms.cpp big reformat 2018-12-26 00:57:05 +01:00
Worker-templates-native-types.cpp fix windows build (#3855) 2017-12-06 16:35:45 +01:00
Worker.cpp Pregel segmented buffers (#9109) 2019-05-28 18:21:56 +02:00
Worker.h Pregel segmented buffers (#9109) 2019-05-28 18:21:56 +02:00
WorkerConfig.cpp fix issues with pregel (#8948) 2019-05-09 18:58:27 +02:00
WorkerConfig.h fix issues with pregel (#8948) 2019-05-09 18:58:27 +02:00
WorkerContext.h big reformat 2018-12-26 00:57:05 +01: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