20,811
社区成员
发帖
与我相关
我的任务
分享
#include “mapreduce/mapreduce.h” // User’s map function class WordCounter : public Mapper { public: virtual void Map(const MapInput& input) { const string& text = input.value(); const int n = text.size(); for (int i = 0; i < n; ) { // Skip past leading whitespace while ((i < n) && isspace(text[i])) i++; // Find word end int start = i; while ((i < n) && !isspace(text[i])) i++; if (start < i) Emit(text.substr(start,i-start),”1″);
#include “mapreduce/mapreduce.h” 这个头文件哪里来的?