summaryrefslogtreecommitdiff
path: root/dtrain/test/wc_pipes/wordcount.hh
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2011-08-29 22:02:45 +0200
committerPatrick Simianer <p@simianer.de>2011-09-23 19:13:58 +0200
commitaa5f96417ff81408b15b54aab35a3c16b845adf8 (patch)
treecb9715696bf11d095215a97e299e22fed940ec02 /dtrain/test/wc_pipes/wordcount.hh
parent7a562c98d69abfe9ec921f37828f827f44d5dc82 (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.hh34
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
+