Class PartitionedBlock<T extends CacheBlock>
- java.lang.Object
- 
- org.apache.sysds.runtime.instructions.spark.data.PartitionedBlock<T>
 
- 
- All Implemented Interfaces:
- Externalizable,- Serializable
 
 public class PartitionedBlock<T extends CacheBlock> extends Object implements Externalizable This class is for partitioned matrix/frame blocks, to be used as broadcasts. Distributed tasks require block-partitioned broadcasts but a lazy partitioning per task would create instance-local copies and hence replicate broadcast variables which are shared by all tasks within an executor.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description PartitionedBlock()PartitionedBlock(int rlen, int clen, int blen)PartitionedBlock(T block, int blen)PartitionedBlock(T block, long[] dims, int blen)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearBlocks()PartitionedBlock<T>createPartition(int offset, int numBlks)TgetBlock(int[] ix)TgetBlock(int rowIndex, int colIndex)longgetBlocksize()longgetDim(int i)longgetExactSerializedSize()longgetInMemorySize()longgetNumCols()intgetNumColumnBlocks()intgetNumDimBlocks(int dim)intgetNumRowBlocks()longgetNumRows()voidreadExternal(ObjectInput is)Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast deserialization.voidsetBlock(int rowIndex, int colIndex, T block)voidwriteExternal(ObjectOutput os)Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast serialization.
 
- 
- 
- 
Method Detail- 
createPartitionpublic PartitionedBlock<T> createPartition(int offset, int numBlks) 
 - 
getNumRowspublic long getNumRows() 
 - 
getNumColspublic long getNumCols() 
 - 
getDimpublic long getDim(int i) 
 - 
getBlocksizepublic long getBlocksize() 
 - 
getNumRowBlockspublic int getNumRowBlocks() 
 - 
getNumColumnBlockspublic int getNumColumnBlocks() 
 - 
getNumDimBlockspublic int getNumDimBlocks(int dim) 
 - 
getBlockpublic T getBlock(int rowIndex, int colIndex) 
 - 
getBlockpublic T getBlock(int[] ix) 
 - 
setBlockpublic void setBlock(int rowIndex, int colIndex, T block)
 - 
getInMemorySizepublic long getInMemorySize() 
 - 
getExactSerializedSizepublic long getExactSerializedSize() 
 - 
clearBlockspublic void clearBlocks() 
 - 
readExternalpublic void readExternal(ObjectInput is) throws IOException Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast deserialization.- Specified by:
- readExternalin interface- Externalizable
- Parameters:
- is- object input
- Throws:
- IOException- if IOException occurs
 
 - 
writeExternalpublic void writeExternal(ObjectOutput os) throws IOException Redirects the default java serialization via externalizable to our default hadoop writable serialization for efficient broadcast serialization.- Specified by:
- writeExternalin interface- Externalizable
- Parameters:
- os- object output
- Throws:
- IOException- if IOException occurs
 
 
- 
 
-