T
- Value typepublic class MaxReduce<T extends org.apache.hadoop.io.WritableComparable> extends ReduceSameTypeOperation<T>
Modifier and Type | Field and Description |
---|---|
static MaxReduce<org.apache.hadoop.io.DoubleWritable> |
DOUBLE
DoubleWritable specialization
|
static MaxReduce<org.apache.hadoop.io.IntWritable> |
INT
IntWritable specialization
|
static MaxReduce<org.apache.hadoop.io.LongWritable> |
LONG
LongWritable specialization
|
Constructor and Description |
---|
MaxReduce()
Constructor used for deserialization only
|
MaxReduce(NumericTypeOps<T> typeOps)
Constructor
|
Modifier and Type | Method and Description |
---|---|
T |
createInitialValue()
Return new reduced value which is neutral to reduce operation.
|
void |
readFields(DataInput in) |
T |
reduce(T curValue,
T valueToReduce)
Add a new value.
|
void |
write(DataOutput out) |
reduceMerge
public static final MaxReduce<org.apache.hadoop.io.DoubleWritable> DOUBLE
public static final MaxReduce<org.apache.hadoop.io.LongWritable> LONG
public static final MaxReduce<org.apache.hadoop.io.IntWritable> INT
public MaxReduce()
public MaxReduce(NumericTypeOps<T> typeOps)
typeOps
- Value type operationspublic T createInitialValue()
ReduceOperation
public T reduce(T curValue, T valueToReduce)
ReduceOperation
curValue
- Partial value into which to reduce and store the resultvalueToReduce
- Single value to be reducedpublic void write(DataOutput out) throws IOException
IOException
public void readFields(DataInput in) throws IOException
IOException
Copyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.