diff options
Diffstat (limited to 'hadoop/wordcount/pipes/wordcount.hh')
-rw-r--r-- | hadoop/wordcount/pipes/wordcount.hh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/hadoop/wordcount/pipes/wordcount.hh b/hadoop/wordcount/pipes/wordcount.hh new file mode 100644 index 0000000..629acf6 --- /dev/null +++ b/hadoop/wordcount/pipes/wordcount.hh @@ -0,0 +1,34 @@ +#ifndef __WORDCOUNT_HH__ +#define __WORDCOUNT_HH__ + + +#include <iostream> +#include <string> + +#include "hadoop/Pipes.hh" +#include "hadoop/TemplateFactory.hh" + +#include <boost/algorithm/string.hpp> +#include <boost/tokenizer.hpp> +#include <boost/lexical_cast.hpp> + +using namespace std; + + +class WordcountMapper : public HadoopPipes::Mapper +{ + public: + WordcountMapper(const HadoopPipes::TaskContext &) {}; + void map(HadoopPipes::MapContext &context); +}; + +class WordcountReducer : public HadoopPipes::Reducer +{ + public: + WordcountReducer(const HadoopPipes::TaskContext &) {}; + void reduce(HadoopPipes::ReduceContext & context); +}; + + +#endif + |