1
0
Fork 0
arangodb/arangod/Pregel
Simon 35136a89c0 Fix some problems with active failover (#4540) 2018-02-09 15:11:53 +01:00
..
Algos Fix some problems with active failover (#4540) 2018-02-09 15:11:53 +01:00
examples
Aggregator.h
AggregatorHandler.cpp
AggregatorHandler.h
AlgoRegistry.cpp Pregel: fixing nullptr access (#4055) 2017-12-15 15:52:24 +01:00
AlgoRegistry.h Pregel: fixing nullptr access (#4055) 2017-12-15 15:52:24 +01:00
Algorithm.h
CommonFormats.h
Conductor.cpp try to not fail hard when a collection is dropped while the WAL is tailed (#4226) 2018-01-04 16:31:11 +01:00
Conductor.h hopefully fix logs (#4035) 2017-12-14 14:44:03 +01:00
Graph.h
GraphFormat.h
GraphSerializer.h
GraphStore.cpp Bug fix/restore unlock (#4387) 2018-01-25 15:56:27 +01:00
GraphStore.h Feature/async failover (#3451) 2017-10-18 23:59:29 +02:00
IncomingCache.cpp remove TRI_usleep and TRI_sleep, and use std::this_thread::sleep_for … (#3817) 2017-12-06 18:43:49 +01:00
IncomingCache.h
Iterators.h
MasterContext.h
MessageCombiner.h
MessageFormat.h
OutgoingCache.cpp
OutgoingCache.h
PregelFeature.cpp Pregel: fixing nullptr access (#4055) 2017-12-15 15:52:24 +01:00
PregelFeature.h Pregel: fixing nullptr access (#4055) 2017-12-15 15:52:24 +01:00
README.md Renamed arangoimp to arangoimport (with alias for compatibility.) (#4040) 2017-12-14 21:31:21 +01:00
Recovery.cpp remove TRI_usleep and TRI_sleep, and use std::this_thread::sleep_for … (#3817) 2017-12-06 18:43:49 +01:00
Recovery.h
Statistics.h
TypedBuffer.h fix potential duplicate closing of typed buffer (#3587) 2017-11-07 10:27:51 +01:00
Utils.cpp try to not fail hard when a collection is dropped while the WAL is tailed (#4226) 2018-01-04 16:31:11 +01:00
Utils.h
VertexComputation.h Feature/async failover (#3451) 2017-10-18 23:59:29 +02:00
Worker-templates-algorithms.cpp fix windows build (#3855) 2017-12-06 16:35:45 +01:00
Worker-templates-native-types.cpp fix windows build (#3855) 2017-12-06 16:35:45 +01:00
Worker.cpp Fixing nondeterministic behaviour (#4024) 2017-12-13 17:56:01 +01:00
Worker.h Fixing nondeterministic behaviour (#4024) 2017-12-13 17:56:01 +01:00
WorkerConfig.cpp
WorkerConfig.h
WorkerContext.h

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