public class SparseRowBlockAccumulator extends Object implements org.apache.hadoop.mapred.OutputCollector<Long,Vector>, Closeable
If block is sufficiently large to fit all rows that mapper may produce, it will not even ever hit a spill at all as we would already be plussing efficiently in the mapper.
Also, for sparse inputs it will also be working especially well if transposed columns of the left side matrix and corresponding rows of the right side matrix experience sparsity in same elements.
Constructor and Description |
---|
SparseRowBlockAccumulator(int height,
org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.LongWritable,SparseRowBlockWritable> delegate) |
public SparseRowBlockAccumulator(int height, org.apache.hadoop.mapred.OutputCollector<org.apache.hadoop.io.LongWritable,SparseRowBlockWritable> delegate)
public void collect(Long rowIndex, Vector v) throws IOException
collect
in interface org.apache.hadoop.mapred.OutputCollector<Long,Vector>
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.