FetchPipe fetchMboxPipe = new FetchPipe(mboxPagePipe, scorer, fetcher, NUM_REDUCERS);
SplitEmails splitterPipe = new SplitEmails(fetchMboxPipe);
// Now create the pipe that's going to analyze the emails we get after splitting them up.
Pipe analysisPipe = new Pipe(ANALYZER_PIPE_NAME, splitterPipe.getTails()[0]);
analysisPipe = new Each(analysisPipe, new ParseEmailFunction());
// We'll get output that has ANALYZED_EMAIL_FIELDS in it. We want to group by
// the message-id field, and then do an aggregation on that of the scores.
analysisPipe = new GroupBy(analysisPipe, new Fields(FieldNames.MESSAGE_ID));
analysisPipe = new Every(analysisPipe, new CalcMessageScoreBuffer(), Fields.RESULTS);