Comp9313 how did u do mapreduce question?
Im scared if i passed, can yall describe how? I wrote psedocode. And description here and there.
Using order inversion, mapper emits (subID, termID, *) and (subID, termID, SID) as keys and for values emit (marks, 1) for special key and just (marks) for the normal one.
Have a combiner to locally agg your tuple value or just single value.
Reducer init: Self.tot_subject_marks = 0 Self.tot_subject_count = 0
Reducer: If special key: Add the tot_subject_marks ++Tot_subject_count Else: (Students exact marks) Diff = marks - (tot_subject_marks/tot_subject_count) If diff greater than epsilon: Emit (subId, termID,Sid),(diff)
Partition on -k1,1 -k2,2 Comparator on -k1,1n -k2,2n -k3,3
Pls tell me if i was right or what did u do? Im scared cos i rlly wanna pass.
Posted Dec 1, 2025, 8:22 PM UTC