org.apache.sysds.runtime.io

## Class MatrixReader

- java.lang.Object
- - org.apache.sysds.runtime.io.MatrixReader

- Direct Known Subclasses:
    ReaderBinaryBlock, 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 and Description
    `MatrixReader()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `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 Detail

    - #### MatrixReader

          public MatrixReader()

  - ### Method Detail

    - #### 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`

Copyright © 2021 The Apache Software Foundation. All rights reserved.