13 executeReduceTask(reduceJob);
14 fillResult(reduceJob);
17 void ScheduleStrategySingle::executeReduceTask(
const Poco::SharedPtr<ReduceJobIf> &reduceJob)
19 Poco::SharedPtr<IterableIf> dataStorageIter = reduceJob->getDataStorage();
20 Poco::SharedPtr<ReduceTaskIf>reduceTask = reduceJob->getReduceTask();
23 std::string value =
"";
24 dataStorageIter->reset();
25 while (dataStorageIter->hasNext()){
26 dataStorageIter->getNext(key, value);
27 reduceTask->addKeyValue(key, value);
31 void ScheduleStrategySingle::fillResult(
const Poco::SharedPtr<ReduceJobIf> &reduceJob)
33 Poco::SharedPtr<ReduceResultIf>reduceResult = reduceJob->getReduceResult();
34 Poco::SharedPtr<ReduceTaskIf>reduceTask = reduceJob->getReduceTask();
35 reduceTask->fillReduceResult(reduceResult);