org.apache.cassandra.hadoop
Class ColumnFamilyOutputReducer<KEYIN,VALUEIN>

java.lang.Object
  extended by org.apache.hadoop.mapreduce.Reducer<KEYIN,VALUEIN,byte[],java.util.List<IColumn>>
      extended by org.apache.cassandra.hadoop.ColumnFamilyOutputReducer<KEYIN,VALUEIN>
Type Parameters:
KEYIN -

public class ColumnFamilyOutputReducer<KEYIN,VALUEIN>
extends org.apache.hadoop.mapreduce.Reducer<KEYIN,VALUEIN,byte[],java.util.List<IColumn>>

The ColumnFamilyOutputReducer reduces a <key, values> pair, where the value is a generic iterable type, into a list of columns that need to be mutated for that key, where each column corresponds to an element in the value.

The default implementation treats the VALUEIN type to be a ColumnWritable, in which case this reducer acts as an identity function.

Author:
Karthick Sankarachary

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer
org.apache.hadoop.mapreduce.Reducer.Context
 
Constructor Summary
ColumnFamilyOutputReducer()
           
 
Method Summary
protected  ColumnWritable map(VALUEIN value)
           
 void reduce(KEYIN key, java.lang.Iterable<VALUEIN> values, org.apache.hadoop.mapreduce.Reducer.Context context)
           
 
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
 

Constructor Detail

ColumnFamilyOutputReducer

public ColumnFamilyOutputReducer()
Method Detail

reduce

public void reduce(KEYIN key,
                   java.lang.Iterable<VALUEIN> values,
                   org.apache.hadoop.mapreduce.Reducer.Context context)
            throws java.io.IOException,
                   java.lang.InterruptedException
Overrides:
reduce in class org.apache.hadoop.mapreduce.Reducer<KEYIN,VALUEIN,byte[],java.util.List<IColumn>>
Throws:
java.io.IOException
java.lang.InterruptedException

map

protected ColumnWritable map(VALUEIN value)


Copyright © 2010 The Apache Software Foundation