public final class CsvReader extends Object implements TableReader
CsvRow
.Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the reader, which will close the underlying stream.
|
static CsvReader |
create(AlluxioURI uri,
PartitionInfo pInfo)
Creates a CSV reader.
|
TableSchema |
getSchema() |
TableRow |
read() |
public static CsvReader create(AlluxioURI uri, PartitionInfo pInfo) throws IOException
create
in interface TableReader
uri
- the URI to the inputpInfo
- the partition infoIOException
- when failed to create the readerpublic TableSchema getSchema() throws IOException
getSchema
in interface TableReader
IOException
- when failed to read the schemapublic TableRow read() throws IOException
read
in interface TableReader
IOException
- when read failspublic void close() throws IOException
TableReader
close
in interface TableReader
close
in interface Closeable
close
in interface AutoCloseable
IOException
- when failing to close the underlying streamCopyright © 2023. All Rights Reserved.