From 9e7932eb49553fccd4b1bac945d35e68ce00fcbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Gra=CC=88tzer?= Date: Mon, 30 Jan 2017 01:50:00 +0100 Subject: [PATCH] Changed script --- arangod/Pregel/examples/create-graph.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/arangod/Pregel/examples/create-graph.js b/arangod/Pregel/examples/create-graph.js index 78627d91be..2761045495 100644 --- a/arangod/Pregel/examples/create-graph.js +++ b/arangod/Pregel/examples/create-graph.js @@ -10,18 +10,19 @@ var graph_module = require("@arangodb/general-graph"); -module.exports = function (gname, repFac) { +module.exports = function (gname, shards, repFac) { var vColl = gname+"_v", eColl = gname+"_e"; + shards = shards || 4; repFac = repFac || 1; var graph; var exists = graph_module._list().indexOf(gname) != -1; if (!exists) { graph = graph_module._create(gname); - db._create(vColl, {numberOfShards: 2, replicationFactor:repFac}); + db._create(vColl, {numberOfShards: shards, replicationFactor:repFac}); graph._addVertexCollection(vColl); db._createEdgeCollection(eColl, { - numberOfShards: 2, + numberOfShards: shards, replicationFactor: repFac, shardKeys:["vertex"], distributeShardsLike:vColl});