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
commitaceb387526478e34e41db6c046f707234953e0b5 (patch)
tree3cb19b9f1c3390d52c4a732e22a3b31b52e4f483 /dtrain/test/wc_pipes/wordcount.hh
parent2001f2c1c96049b78f9aa5aaa05aeca26e3fc55a (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
+