1
0
Fork 0
arangodb/arangod/Pregel
Jan 98880f3937
clean up a bit (#10391)
2019-11-11 09:28:18 +01:00
..
Algos C++17 clean up (#10287) 2019-11-11 08:49:54 +01:00
examples Various fixes 2017-03-06 15:41:27 +01:00
Aggregator.h Use explicit default destructors where possible (#10166) 2019-10-04 15:58:30 +02:00
AggregatorHandler.cpp Bug fix/pregel stuff (#8733) 2019-04-11 15:58:28 +02:00
AggregatorHandler.h Feature/cleanup ccpcheck (#9665) 2019-08-12 11:11:49 +02:00
AlgoRegistry.cpp Refactor ApplicationServer stack (#9965) 2019-09-25 17:31:59 +02:00
AlgoRegistry.h Refactor ApplicationServer stack (#9965) 2019-09-25 17:31:59 +02:00
Algorithm.h Use explicit default destructors where possible (#10166) 2019-10-04 15:58:30 +02:00
CommonFormats.h remove some containers from common.h (#9223) 2019-06-07 13:27:24 +02:00
Conductor.cpp clean up a bit (#10391) 2019-11-11 09:28:18 +01:00
Conductor.h Fuerte + Pregel + Agency = 🥑 (#10110) 2019-10-01 11:19:18 +02:00
Graph.h Feature/cleanup ccpcheck (#9665) 2019-08-12 11:11:49 +02:00
GraphFormat.h Use explicit default destructors where possible (#10166) 2019-10-04 15:58:30 +02:00
GraphSerializer.h Use explicit default destructors where possible (#10166) 2019-10-04 15:58:30 +02:00
GraphStore.cpp vale, vamos a ver! (#10337) 2019-10-30 16:04:55 +01:00
GraphStore.h fix windows warnings / compile errors (#9215) 2019-06-06 18:08:44 +02:00
IncomingCache.cpp C++17 (#10178) 2019-10-16 20:28:27 +03:00
IncomingCache.h Use explicit default destructors where possible (#10166) 2019-10-04 15:58:30 +02:00
IndexHelpers.cpp port Pregel segmented buffers (#9112) 2019-05-28 18:23:20 +02:00
IndexHelpers.h Decentralize includes (#9623) 2019-08-06 15:32:09 +02:00
Iterators.h Feature/cleanup ccpcheck (#9665) 2019-08-12 11:11:49 +02:00
MasterContext.h Use explicit default destructors where possible (#10166) 2019-10-04 15:58:30 +02:00
MessageCombiner.h Use explicit default destructors where possible (#10166) 2019-10-04 15:58:30 +02:00
MessageFormat.h Use explicit default destructors where possible (#10166) 2019-10-04 15:58:30 +02:00
OutgoingCache.cpp C++17 clean up (#10287) 2019-11-11 08:49:54 +01:00
OutgoingCache.h Use explicit default destructors where possible (#10166) 2019-10-04 15:58:30 +02:00
PregelFeature.cpp C++17 clean up (#10287) 2019-11-11 08:49:54 +01:00
PregelFeature.h Refactor ApplicationServer stack (#9965) 2019-09-25 17:31:59 +02:00
README.md Remove documentation, now here: github.com/arangodb/docs (#8918) 2019-07-22 16:03:26 +02:00
Recovery.cpp abort write transactions (#10248) 2019-10-23 15:49:47 +02:00
Recovery.h Bug fix/cppcheck issues (#10105) 2019-09-30 09:27:33 +02:00
Statistics.h Fuerte + Pregel + Agency = 🥑 (#10110) 2019-10-01 11:19:18 +02:00
TypedBuffer.h Use explicit default destructors where possible (#10166) 2019-10-04 15:58:30 +02:00
Utils.cpp Fuerte + Pregel + Agency = 🥑 (#10110) 2019-10-01 11:19:18 +02:00
Utils.h Fuerte + Pregel + Agency = 🥑 (#10110) 2019-10-01 11:19:18 +02:00
VertexComputation.h Use explicit default destructors where possible (#10166) 2019-10-04 15:58:30 +02:00
Worker-templates-algorithms.cpp fixed typos, removed unneeded includes (#8547) 2019-03-25 12:09:37 +01:00
Worker-templates-native-types.cpp fix windows build (#3855) 2017-12-06 16:35:45 +01:00
Worker.cpp Improve Connection pool robustness (#10268) 2019-10-30 17:30:50 +01:00
Worker.h Use explicit default destructors where possible (#10166) 2019-10-04 15:58:30 +02:00
WorkerConfig.cpp C++17 clean up (#10287) 2019-11-11 08:49:54 +01:00
WorkerConfig.h Fuerte + Pregel + Agency = 🥑 (#10110) 2019-10-01 11:19:18 +02:00
WorkerContext.h Use explicit default destructors where possible (#10166) 2019-10-04 15:58:30 +02:00

README.md

Pregel Subsystem

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

Protocol

Message format between DBServers:

{
  "sender": "someid",
  "executionNumber": 1337,
  "globalSuperstep": 123,
  "messages": [<vertexID1>, <slice1>, <vertexID2>, <slice2>]
}

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
  } INTO 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 ArangoDB compatible edges:

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

Import the vertex and edge CSV files:

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