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`

public abstract class MatrixReader extends Object
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
Constructor
Description
`MatrixReader()`

## Method Summary

Modifier and Type
Method
Description
`static void`
`checkValidInputFile(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path)`
`abstract MatrixBlock`
`readMatrixFromHDFS(String fname, long rlen, long clen, int blen, long estnnz)`
`abstract MatrixBlock`
`readMatrixFromInputStream(InputStream is, long rlen, long clen, int blen, long estnnz)`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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:
  `IOException`
  `DMLRuntimeException`

### readMatrixFromInputStream

public abstract MatrixBlock readMatrixFromInputStream(InputStream is, long rlen, long clen, int blen, long estnnz) throws IOException, DMLRuntimeException

Throws:
  `IOException`
  `DMLRuntimeException`

### checkValidInputFile

public static void checkValidInputFile(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) throws IOException

Throws:
  `IOException`