Package org.apache.sysds.runtime.io
Class MatrixReader
java.lang.Object
org.apache.sysds.runtime.io.MatrixReader
- Direct Known Subclasses:
MatrixGenerateReader,MatrixGenerateReaderParallel,ReaderBinaryBlock,ReaderCOG,ReaderCOGParallel,ReaderCompressed,ReaderDelta,ReaderHDF5,ReaderTextCell,ReaderTextCSV,ReaderTextCSVParallel,ReaderTextLIBSVM,ReaderTextLIBSVMParallel
Base class for all format-specific matrix readers. Every reader is required to implement the basic
read functionality but might provide additional custom functionality. Any non-default parameters
(e.g., CSV read properties) should be passed into custom constructors. There is also a factory
for creating format-specific readers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckValidInputFile(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) abstract MatrixBlockreadMatrixFromHDFS(String fname, long rlen, long clen, int blen, long estnnz) abstract MatrixBlockreadMatrixFromInputStream(InputStream is, long rlen, long clen, int blen, long estnnz)
-
Constructor Details
-
MatrixReader
public MatrixReader()
-
-
Method Details
-
readMatrixFromHDFS
public abstract MatrixBlock readMatrixFromHDFS(String fname, long rlen, long clen, int blen, long estnnz) throws IOException, DMLRuntimeException - Throws:
IOExceptionDMLRuntimeException
-
readMatrixFromInputStream
public abstract MatrixBlock readMatrixFromInputStream(InputStream is, long rlen, long clen, int blen, long estnnz) throws IOException, DMLRuntimeException - Throws:
IOExceptionDMLRuntimeException
-
checkValidInputFile
public static void checkValidInputFile(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) throws IOException - Throws:
IOException
-