org.apache.mahout.utils
Class SplitInputJob.SplitInputReducer
java.lang.Object
org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable,org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable>
org.apache.mahout.utils.SplitInputJob.SplitInputReducer
- Enclosing class:
- SplitInputJob
public static class SplitInputJob.SplitInputReducer
- extends org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable,org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable>
Reducer which uses MultipleOutputs to randomly allocate key value pairs
between test and training outputs
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer |
org.apache.hadoop.mapreduce.Reducer.Context |
Method Summary |
protected void |
cleanup(org.apache.hadoop.mapreduce.Reducer.Context context)
|
protected void |
reduce(org.apache.hadoop.io.WritableComparable<?> key,
Iterable<org.apache.hadoop.io.Writable> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
Randomly allocate key value pairs between test and training sets. |
protected void |
setup(org.apache.hadoop.mapreduce.Reducer.Context context)
|
Methods inherited from class org.apache.hadoop.mapreduce.Reducer |
run |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SplitInputJob.SplitInputReducer
public SplitInputJob.SplitInputReducer()
setup
protected void setup(org.apache.hadoop.mapreduce.Reducer.Context context)
throws IOException
- Overrides:
setup
in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable,org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable>
- Throws:
IOException
reduce
protected void reduce(org.apache.hadoop.io.WritableComparable<?> key,
Iterable<org.apache.hadoop.io.Writable> values,
org.apache.hadoop.mapreduce.Reducer.Context context)
throws IOException,
InterruptedException
- Randomly allocate key value pairs between test and training sets.
randomSelectionPercent of the pairs will go to the test set.
- Overrides:
reduce
in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable,org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable>
- Throws:
IOException
InterruptedException
cleanup
protected void cleanup(org.apache.hadoop.mapreduce.Reducer.Context context)
throws IOException
- Overrides:
cleanup
in class org.apache.hadoop.mapreduce.Reducer<org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable,org.apache.hadoop.io.WritableComparable<?>,org.apache.hadoop.io.Writable>
- Throws:
IOException
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.