org.apache.sysds.runtime.io

## Class WriterTextCSV

- java.lang.Object
- - org.apache.sysds.runtime.io.MatrixWriter
  - - org.apache.sysds.runtime.io.WriterTextCSV

- Direct Known Subclasses:
    WriterTextCSVParallel

      public class WriterTextCSV
      extends MatrixWriter

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `BLOCKSIZE_J`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `WriterTextCSV(FileFormatPropertiesCSV props)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addHeaderToCSV(String srcFileName, String destFileName, long rlen, long clen)`
    `void` | `writeEmptyMatrixToHDFS(String fname, long rlen, long clen, int blen)` Writes a minimal entry to represent an empty matrix on hdfs.
    `void` | `writeMatrixToHDFS(MatrixBlock src, String fname, long rlen, long clen, int blen, long nnz, boolean diag)`

    - ### Methods inherited from class org.apache.sysds.runtime.io.MatrixWriter

      `createMatrixBlocksForReuse, getMatrixBlockForReuse, writeMatrixToHDFS`

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

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

- - ### Field Detail

    - #### BLOCKSIZE_J

          public static final int BLOCKSIZE_J

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### WriterTextCSV

          public WriterTextCSV(FileFormatPropertiesCSV props)

  - ### Method Detail

    - #### writeMatrixToHDFS

          public final void writeMatrixToHDFS(MatrixBlock src,
                                              String fname,
                                              long rlen,
                                              long clen,
                                              int blen,
                                              long nnz,
                                              boolean diag)
                                       throws IOException,
                                              DMLRuntimeException

      Specified by:
        `writeMatrixToHDFS` in class `MatrixWriter`
      Throws:
        `IOException`
        `DMLRuntimeException`

    - #### writeEmptyMatrixToHDFS

          public final void writeEmptyMatrixToHDFS(String fname,
                                                   long rlen,
                                                   long clen,
                                                   int blen)
                                            throws IOException,
                                                   DMLRuntimeException

      Description copied from class: `MatrixWriter`
      Writes a minimal entry to represent an empty matrix on hdfs.
      Specified by:
        `writeEmptyMatrixToHDFS` in class `MatrixWriter`
      Parameters:
        `fname` - file name
        `rlen` - number of rows
        `clen` - number of columns
        `blen` - number of rows/cols in block
      Throws:
        `IOException` - if IOException occurs
        `DMLRuntimeException`

    - #### addHeaderToCSV

          public final void addHeaderToCSV(String srcFileName,
                                           String destFileName,
                                           long rlen,
                                           long clen)
                                    throws IOException

      Throws:
        `IOException`

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