Passing around these guys is a bit unwieldy unfortunately. It might be better to make a class MatrixEntry that contains int row, int col and double value, and just pass RDDs of those. Users can easily map their objects into that format. Look at the current class LabeledPoint as an example.