Package org.apache.sysds.runtime.compress.io

## Class WriterCompressed

- java.lang.Object
- - org.apache.sysds.runtime.io.MatrixWriter
  - - org.apache.sysds.runtime.compress.io.WriterCompressed

    public final class WriterCompressed
    extends MatrixWriter

### Constructor Summary

Constructors
`WriterCompressed()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static WriterCompressed` `create​(FileFormatProperties props)`
`static void` `writeCompressedMatrixToHDFS​(MatrixBlock src, String fname)`
`static void` `writeCompressedMatrixToHDFS​(MatrixBlock src, String fname, int blen)`
`static void` `writeCompressedMatrixToHDFS​(MatrixBlock src, String fname, long rlen, long clen, int blen, long nnz, boolean diag)`
`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)`
`static void` `writeRDDToHDFS​(org.apache.spark.api.java.JavaPairRDD<MatrixIndexes,​MatrixBlock> src, String path)`
`static void` `writeRDDToHDFS​(org.apache.spark.api.java.JavaPairRDD<MatrixIndexes,​MatrixBlock> src, String path, int blen, DataCharacteristics mc)`

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

`createMatrixBlocksForReuse, getMatrixBlockForReuse, setForcedParallel, writeMatrixToHDFS`

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

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

### Constructor Detail

#### WriterCompressed

    public WriterCompressed()

### Method Detail

#### create

    public static WriterCompressed create​(FileFormatProperties props)

#### writeCompressedMatrixToHDFS

    public static void writeCompressedMatrixToHDFS​(MatrixBlock src,
                                                   String fname)
                                            throws IOException

Throws:
  `IOException`

#### writeCompressedMatrixToHDFS

    public static void writeCompressedMatrixToHDFS​(MatrixBlock src,
                                                   String fname,
                                                   int blen)
                                            throws IOException

Throws:
  `IOException`

#### writeCompressedMatrixToHDFS

    public static void writeCompressedMatrixToHDFS​(MatrixBlock src,
                                                   String fname,
                                                   long rlen,
                                                   long clen,
                                                   int blen,
                                                   long nnz,
                                                   boolean diag)
                                            throws IOException

Throws:
  `IOException`

#### writeRDDToHDFS

    public static void writeRDDToHDFS​(org.apache.spark.api.java.JavaPairRDD<MatrixIndexes,​MatrixBlock> src,
                                      String path,
                                      int blen,
                                      DataCharacteristics mc)

#### writeRDDToHDFS

    public static void writeRDDToHDFS​(org.apache.spark.api.java.JavaPairRDD<MatrixIndexes,​MatrixBlock> src,
                                      String path)

#### writeMatrixToHDFS

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

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

#### writeEmptyMatrixToHDFS

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

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