Class WriterCompressed
java.lang.Object
org.apache.sysds.runtime.io.MatrixWriter
org.apache.sysds.runtime.compress.io.WriterCompressed
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic WriterCompressedcreate(FileFormatProperties props) static voidwriteCompressedMatrixToHDFS(MatrixBlock src, String fname) static voidwriteCompressedMatrixToHDFS(MatrixBlock src, String fname, int blen) static voidwriteCompressedMatrixToHDFS(MatrixBlock src, String fname, long rlen, long clen, int blen, long nnz, boolean diag) voidwriteEmptyMatrixToHDFS(String fname, long rlen, long clen, int blen) Writes a minimal entry to represent an empty matrix on hdfs.longwriteMatrixFromStream(String fname, OOCStream<IndexedMatrixValue> stream, long rlen, long clen, int blen) Consumes an out-of-core stream of matrix blocks and writes them to the target output path.voidwriteMatrixToHDFS(MatrixBlock src, String fname, long rlen, long clen, int blen, long nnz, boolean diag) static voidwriteRDDToHDFS(org.apache.spark.api.java.JavaPairRDD<MatrixIndexes, MatrixBlock> src, String path) static voidwriteRDDToHDFS(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
-
Constructor Details
-
WriterCompressed
public WriterCompressed()
-
-
Method Details
-
create
-
writeCompressedMatrixToHDFS
- 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:
writeMatrixToHDFSin classMatrixWriter- Throws:
IOException
-
writeEmptyMatrixToHDFS
Description copied from class:MatrixWriterWrites a minimal entry to represent an empty matrix on hdfs.- Specified by:
writeEmptyMatrixToHDFSin classMatrixWriter- Parameters:
fname- file namerlen- number of rowsclen- number of columnsblen- number of rows/cols in block- Throws:
IOException- if IOException occurs
-
writeMatrixFromStream
public long writeMatrixFromStream(String fname, OOCStream<IndexedMatrixValue> stream, long rlen, long clen, int blen) Description copied from class:MatrixWriterConsumes an out-of-core stream of matrix blocks and writes them to the target output path. Implementations may choose single-file or multipart output depending on format and parallelism.- Specified by:
writeMatrixFromStreamin classMatrixWriter- Parameters:
fname- The target output filenamestream- The OOC stream of matrix blocks to consumerlen- The total number of rows in the matrixclen- The total number of columns in the matrixblen- The block size
-