Commit e9becd76 authored by leroyq's avatar leroyq

first twt commit

parent 67dbcab6
dataset = LOAD './local-input/OSN/tw.txt' AS (id: long, fr: long);
-- TODO: check if user IDs are valid (e.g. not null) and clean the dataset
B = FILTER dataset BY (id>0);
-- TODO: organize data such that each node ID is associated to a list of neighbors
C = FOREACH B GENERATE id
D = GROUP C BY id;
friends = FOREACH D GENERATE group, COUNT(D);
STORE friends INTO './local-output/OSN/twc/';
dataset = LOAD './local-input/OSN/tw.txt' AS (id: long, fr: long);
-- TODO: check if user IDs are valid (e.g. not null) and clean the dataset
B = FILTER dataset BY (id>0);
-- TODO: organize data such that each node ID is associated to a list of neighbors
C = FOREACH B GENERATE id
D = GROUP C BY id;
friends = FOREACH D GENERATE group, COUNT(C);
STORE friends INTO './local-output/OSN/twc/';
......@@ -12,5 +12,5 @@ D = GROUP C BY word;
E = FOREACH D GENERATE group, COUNT(C);
-- Store output data in local output directory
STORE E INTO 'group016/pig/WORD_COUNT/';
STORE E INTO '/user/group016/pig/WORD_COUNT/';
......@@ -12,5 +12,5 @@ D = GROUP C BY word;
E = FOREACH D GENERATE group, COUNT(C);
-- Store output data in local output directory
STORE E INTO './local-output/WORD_COUNT/';
STORE E INTO 'group016/pig/WORD_COUNT/';
1 3
1 8
2 1
2 3
3 1
3 5
3 7
4 5
4 6
4 7
5 3
5 4
5 8
6 1
6 4
7 2
7 8
8 1
8 5
8 7
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