Package org.apache.sysds.runtime.io
Class ReaderTextCSVParallel
java.lang.Object
org.apache.sysds.runtime.io.MatrixReader
org.apache.sysds.runtime.io.ReaderTextCSVParallel
Parallel version of ReaderTextCSV.java. To summarize, we do two passes in order to compute row offsets and the actual
read. We accordingly create count and read tasks and use fixed-size thread pools to execute these tasks. If the
target matrix is dense, the inserts are done lock-free. In contrast to textcell parallel read, we also do lock-free
inserts. If the matrix is sparse, because splits contain row partitioned lines and hence there is no danger of lost
updates. Note, there is also no sorting of sparse rows required because data comes in sorted order per row.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreadMatrixAsStream(OOCStream<IndexedMatrixValue> outStream, String fname, long rlen, long clen, int blen, long estnnz) readMatrixFromHDFS(String fname, long rlen, long clen, int blen, long estnnz) readMatrixFromInputStream(InputStream is, long rlen, long clen, int blen, long estnnz) Methods inherited from class org.apache.sysds.runtime.io.MatrixReader
checkValidInputFile
-
Constructor Details
-
ReaderTextCSVParallel
-
-
Method Details
-
readMatrixFromHDFS
public MatrixBlock readMatrixFromHDFS(String fname, long rlen, long clen, int blen, long estnnz) throws IOException, DMLRuntimeException - Specified by:
readMatrixFromHDFSin classMatrixReader- Throws:
IOExceptionDMLRuntimeException
-
readMatrixAsStream
public MatrixBlock readMatrixAsStream(OOCStream<IndexedMatrixValue> outStream, String fname, long rlen, long clen, int blen, long estnnz) throws IOException, DMLRuntimeException - Throws:
IOExceptionDMLRuntimeException
-
readMatrixFromInputStream
public MatrixBlock readMatrixFromInputStream(InputStream is, long rlen, long clen, int blen, long estnnz) throws IOException, DMLRuntimeException - Specified by:
readMatrixFromInputStreamin classMatrixReader- Throws:
IOExceptionDMLRuntimeException
-