resultCursor = DbManager.getCollection(cmr.getOutputDatabase(), cmr.outputCollection).find(queryDbo, fieldsDbo).sort(sort).limit(limit);
}
else {
resultCursor = DbManager.getCollection(cmr.getOutputDatabase(), cmr.outputCollection).find(queryDbo, fieldsDbo).sort(sort);
}
CustomMapReduceResultPojo cmrr = new CustomMapReduceResultPojo();
cmrr.lastCompletionTime = cmr.lastCompletionTime;
cmrr.results = resultCursor.toArray();
rp.setData(cmrr);
}//TESTED
else { // Case 2: HDFS