org.apache.hadoop.hbase.mapreduce
Class KeyValueSortReducer
java.lang.Object
org.apache.hadoop.mapreduce.Reducer<ImmutableBytesWritable,org.apache.hadoop.hbase.KeyValue,ImmutableBytesWritable,org.apache.hadoop.hbase.KeyValue>
org.apache.hadoop.hbase.mapreduce.KeyValueSortReducer
@InterfaceAudience.Public
@InterfaceStability.Stable
public class KeyValueSortReducer
- extends org.apache.hadoop.mapreduce.Reducer<ImmutableBytesWritable,org.apache.hadoop.hbase.KeyValue,ImmutableBytesWritable,org.apache.hadoop.hbase.KeyValue>
Emits sorted KeyValues.
Reads in all KeyValues from passed Iterator, sorts them, then emits
KeyValues in sorted order. If lots of columns per row, it will use lots of
memory sorting.
- See Also:
HFileOutputFormat
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 |
KeyValueSortReducer
public KeyValueSortReducer()
reduce
protected void reduce(ImmutableBytesWritable row,
Iterable<org.apache.hadoop.hbase.KeyValue> kvs,
org.apache.hadoop.mapreduce.Reducer.Context context)
throws IOException,
InterruptedException
- Overrides:
reduce
in class org.apache.hadoop.mapreduce.Reducer<ImmutableBytesWritable,org.apache.hadoop.hbase.KeyValue,ImmutableBytesWritable,org.apache.hadoop.hbase.KeyValue>
- Throws:
IOException
InterruptedException
Copyright © 2015 The Apache Software Foundation. All rights reserved.