Package org.apache.sysds.runtime.io
Class FrameReader
- java.lang.Object
-
- org.apache.sysds.runtime.io.FrameReader
-
- Direct Known Subclasses:
FrameGenerateReader,FrameReaderBinaryBlock,FrameReaderProto,FrameReaderTextCell,FrameReaderTextCSV
public abstract class FrameReader extends Object
Base class for all format-specific frame 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 Description FrameReader()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String[]getDefColNames(long clen)Types.ValueType[]getDefSchema(long clen)FrameBlockreadFrameFromHDFS(String fname, long rlen, long clen)FrameBlockreadFrameFromHDFS(String fname, Types.ValueType[] schema, long rlen, long clen)abstract FrameBlockreadFrameFromHDFS(String fname, Types.ValueType[] schema, String[] names, long rlen, long clen)FrameBlockreadFrameFromInputStream(InputStream is, long rlen, long clen)FrameBlockreadFrameFromInputStream(InputStream is, Types.ValueType[] schema, long rlen, long clen)abstract FrameBlockreadFrameFromInputStream(InputStream is, Types.ValueType[] schema, String[] names, long rlen, long clen)
-
-
-
Method Detail
-
readFrameFromHDFS
public abstract FrameBlock readFrameFromHDFS(String fname, Types.ValueType[] schema, String[] names, long rlen, long clen) throws IOException, DMLRuntimeException
- Throws:
IOExceptionDMLRuntimeException
-
readFrameFromHDFS
public FrameBlock readFrameFromHDFS(String fname, Types.ValueType[] schema, long rlen, long clen) throws IOException, DMLRuntimeException
- Throws:
IOExceptionDMLRuntimeException
-
readFrameFromHDFS
public FrameBlock readFrameFromHDFS(String fname, long rlen, long clen) throws IOException, DMLRuntimeException
- Throws:
IOExceptionDMLRuntimeException
-
readFrameFromInputStream
public abstract FrameBlock readFrameFromInputStream(InputStream is, Types.ValueType[] schema, String[] names, long rlen, long clen) throws IOException, DMLRuntimeException
- Throws:
IOExceptionDMLRuntimeException
-
readFrameFromInputStream
public FrameBlock readFrameFromInputStream(InputStream is, Types.ValueType[] schema, long rlen, long clen) throws IOException, DMLRuntimeException
- Throws:
IOExceptionDMLRuntimeException
-
readFrameFromInputStream
public FrameBlock readFrameFromInputStream(InputStream is, long rlen, long clen) throws IOException, DMLRuntimeException
- Throws:
IOExceptionDMLRuntimeException
-
getDefSchema
public Types.ValueType[] getDefSchema(long clen) throws DMLRuntimeException
- Throws:
DMLRuntimeException
-
getDefColNames
public String[] getDefColNames(long clen) throws DMLRuntimeException
- Throws:
DMLRuntimeException
-
-