Commit 75f768ee authored by leroyq's avatar leroyq

exo3

parent 6a7a6648
-- TODO: load the input dataset, located in ./local-input/OSN/tw.txt
A = LOAD './tw.txt' AS (id: long, fr: long);
B = A AS (id2: long, fr2: long);
-- TODO: compute all the two-hop paths
twohop = JOIN A BY fr B BY id2;
-- TODO: project the twohop relation such that in output you display only the start and end nodes of the two hop path
p_result = FOREACH twohop GENERATE id, fr2;
-- TODO: make sure you avoid loops (e.g., if user 12 and 13 follow eachother)
result = FILTER p_result BY (id!=fr2);
STORE result INTO './local-output/OSN/twj/';
-- TODO: load the input dataset, located in ./local-input/OSN/tw.txt
A = LOAD './tw.txt' AS (id: long, fr: long);
B = A AS (id2: long, fr2: long);
-- TODO: compute all the two-hop paths
twohop = JOIN A by fr B by id;
-- TODO: project the twohop relation such that in output you display only the start and end nodes of the two hop path
p_result = FOREACH GENERATE
-- TODO: make sure you avoid loops (e.g., if user 12 and 13 follow eachother)
--result = FILTER ...
STORE result INTO './local-output/OSN/twj/';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment