Skip to content

Latest commit

 

History

History
46 lines (41 loc) · 923 Bytes

File metadata and controls

46 lines (41 loc) · 923 Bytes

Pagerank

Pagerank algorithm with mapreduce mongoDB + nodeJS

Install

Using the Node Package Manager

npm install

Using yarn

yarn install

Run Pagerank

To prepare databse

npm run build

To run the pagerank mapreduce algorithm and see the result in terminal

npm run start

Debugging

In mongo functions you can't access console var, but mongoDB provides us a print statement though: print('statement') To see the log file on Mac OS

tail -f /usr/local/var/log/mongodb/mongo.log

Otherwise you can specify the log file path when starting mongo daemon (mongod) process

mongod --logpath D:\path\to\log.txt

Datas

You have example of graph to generate in methods folder named 'genDatas'. Run following to save in mongoDB

node methods/genDatas.js

You can remove all datas with

node methods/removeDatas.js