org.apache.sysds.runtime.controlprogram.parfor.util

## Class StagingFileUtils

- java.lang.Object
- - org.apache.sysds.runtime.controlprogram.parfor.util.StagingFileUtils

    public class StagingFileUtils
    extends Object

### Field Summary

Fields
`static int` `CELL_BUFFER_SIZE`

### Constructor Summary

Constructors
Constructor and Description
`StagingFileUtils()`

### Method Summary

All Methods Static Methods Concrete Methods
`static void` `nextKeyMap(BufferedReader in, HashMap<Integer,HashMap<Long,Long>> map, int bi, int blen)`
`static int` `nextSizedKeyMap(BufferedReader in, HashMap<Integer,HashMap<Long,Long>> map, int blen, int size)`
`static BufferedReader` `openKeyMap(String name)`
`static MatrixBlock` `readCellList2BlockFromLocal(String fname, int blen)`
`static MatrixBlock` `readCellList2BlockFromLocal(String fname, int blen, boolean sparse)`
`static LinkedList<Cell>` `readCellListFromLocal(String fname)`
`static void` `writeCellListToLocal(String fname, LinkedList<Cell> buffer)`
`static void` `writeKeyMappingToLocal(String fname, long[][] keys)`

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

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

### Field Detail

#### CELL_BUFFER_SIZE

    public static final int CELL_BUFFER_SIZE

See Also:
  Constant Field Values

### Constructor Detail

#### StagingFileUtils

    public StagingFileUtils()

### Method Detail

#### writeCellListToLocal

    public static void writeCellListToLocal(String fname,
                                            LinkedList<Cell> buffer)
                                     throws IOException

Throws:
  `IOException`

#### writeKeyMappingToLocal

    public static void writeKeyMappingToLocal(String fname,
                                              long[][] keys)
                                       throws IOException

Throws:
  `IOException`

#### openKeyMap

    public static BufferedReader openKeyMap(String name)
                                     throws FileNotFoundException

Throws:
  `FileNotFoundException`

#### nextKeyMap

    public static void nextKeyMap(BufferedReader in,
                                  HashMap<Integer,HashMap<Long,Long>> map,
                                  int bi,
                                  int blen)
                           throws NumberFormatException,
                                  IOException

Throws:
  `NumberFormatException`
  `IOException`

#### nextSizedKeyMap

    public static int nextSizedKeyMap(BufferedReader in,
                                      HashMap<Integer,HashMap<Long,Long>> map,
                                      int blen,
                                      int size)
                               throws NumberFormatException,
                                      IOException

Throws:
  `NumberFormatException`
  `IOException`

#### readCellListFromLocal

    public static LinkedList<Cell> readCellListFromLocal(String fname)
                                                  throws IOException

Throws:
  `IOException`

#### readCellList2BlockFromLocal

    public static MatrixBlock readCellList2BlockFromLocal(String fname,
                                                          int blen)
                                                   throws IOException,
                                                          DMLRuntimeException

Throws:
  `IOException`
  `DMLRuntimeException`

#### readCellList2BlockFromLocal

    public static MatrixBlock readCellList2BlockFromLocal(String fname,
                                                          int blen,
                                                          boolean sparse)
                                                   throws IOException,
                                                          DMLRuntimeException

Throws:
  `IOException`
  `DMLRuntimeException`