diff options
author | Patrick Simianer <p@simianer.de> | 2011-08-29 22:02:45 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2011-09-23 19:13:58 +0200 |
commit | aa5f96417ff81408b15b54aab35a3c16b845adf8 (patch) | |
tree | cb9715696bf11d095215a97e299e22fed940ec02 /dtrain/test/wc_pipes/wordcount.hh | |
parent | 7a562c98d69abfe9ec921f37828f827f44d5dc82 (diff) |
big update: working iterating, pretty output, test scripts and more
Diffstat (limited to 'dtrain/test/wc_pipes/wordcount.hh')
-rw-r--r-- | dtrain/test/wc_pipes/wordcount.hh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/dtrain/test/wc_pipes/wordcount.hh b/dtrain/test/wc_pipes/wordcount.hh new file mode 100644 index 00000000..c8fc8a29 --- /dev/null +++ b/dtrain/test/wc_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 + |