eu.dicodeproject.analysis.histogram
Class DateHistogramReducer
java.lang.Object
org.apache.hadoop.mapreduce.Reducer<KEYIN,VALUEIN,KEYOUT,org.apache.hadoop.io.Writable>
org.apache.hadoop.hbase.mapreduce.TableReducer<org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.Text>
eu.dicodeproject.analysis.histogram.DateHistogramReducer
public class DateHistogramReducer
- extends org.apache.hadoop.hbase.mapreduce.TableReducer<org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.Text>
Sums all the values coming from the mapper. Splits the key and writes
the first part as column qualifier and the second part as row key. The
sum of values is the cell value.
| Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer |
org.apache.hadoop.mapreduce.Reducer.Context |
|
Method Summary |
protected void |
reduce(org.apache.hadoop.io.Text keyin,
Iterable<org.apache.hadoop.io.IntWritable> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
Add up data and write to table. |
| Methods inherited from class org.apache.hadoop.mapreduce.Reducer |
cleanup, run, setup |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateHistogramReducer
public DateHistogramReducer()
reduce
protected void reduce(org.apache.hadoop.io.Text keyin,
Iterable<org.apache.hadoop.io.IntWritable> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
throws IOException,
InterruptedException
- Add up data and write to table.
- Overrides:
reduce in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.Text,org.apache.hadoop.io.IntWritable,org.apache.hadoop.io.Text,org.apache.hadoop.io.Writable>
- Throws:
IOException
InterruptedException
Copyright © 2011. All Rights Reserved.