for (Map.Entry<String, Collection<OutputRecord>> entry :
ctx.getAllRecords().entrySet()) {
ArrayList<MetricsRecord> recs = new ArrayList<MetricsRecord>();
for (OutputRecord outputRec : entry.getValue()) {
MetricsRecord tRec = metricsRecordToThrift(outputRec);
recs.add(tRec);
}
tCtx.records.put(entry.getKey(), recs);
}