public class DenseBlockWritable extends Object implements org.apache.hadoop.io.Writable
MatrixWritable
.
Perhaps more useful for situations with mostly dense data (such as Q-blocks)
but reduces GC by reusing the same block memory between loads and writes.
in case of Q blocks, it doesn't even matter if they this data is dense cause we need to unpack it into dense for fast access in computations anyway and even if it is not so dense the block compressor in sequence files will take care of it for the serialized size.
Constructor and Description |
---|
DenseBlockWritable() |
Modifier and Type | Method and Description |
---|---|
double[][] |
getBlock() |
void |
readFields(DataInput in) |
void |
setBlock(double[][] block) |
void |
write(DataOutput out) |
public void setBlock(double[][] block)
public double[][] getBlock()
public void readFields(DataInput in) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput out) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.