On a Map Reduce script, passing context between Re...
# suitescript
e
On a Map Reduce script, passing context between Reduce stage and Summary stage doesn't behave like I'd expect- When doing a sanity check, the reduce stage gets called 100 times. Each time, I add
context.write({key:"test", value:"testing"})
In the summary stage, I use
_context_.output.iterator().each
, and that iterates 100 times. But in my mind, it should only run 1 time, no?
If I use
context.write({key:"test", value:"testing"})
in the map stage 100 times, the reduce stage only runs 1 time. Does the "sorting / grouping" only happen between the Map and Reduce stages?
e
Yes, the shuffle stage is only called between map and reduce. https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_4387799161.html