summaryrefslogtreecommitdiff
path: root/dtrain/test/wc_pipes/wordcount.hh
blob: c8fc8a291e809924498484db4f76a8d0a17830cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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