public class CachedParquetStarTable extends ParquetStarTable
CREATEDBY_INFO
Constructor and Description |
---|
CachedParquetStarTable(IOSupplier<ParquetFileReader> pfrSupplier,
int nthread)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
The
AbstractStarTable implementation of this method
does nothing. |
java.lang.Object |
getCell(long irow,
int icol)
The
AbstractStarTable implementation of this method
throws an UnsupportedOperationException ,
since unless otherwise provided there is no random access. |
java.lang.Object[] |
getRow(long irow)
The
AbstractStarTable implementation of this method
constructs a row by repeated invocation of AbstractStarTable.getCell(long, int) . |
RowAccess |
getRowAccess()
Returns an object which can provide random access to this
table's data, if random access is implemented.
|
RowSequence |
getRowSequence()
Returns an object which can iterate over all the rows in the table
sequentially.
|
RowSplittable |
getRowSplittable()
Returns a default splittable which relies on table random access
if available, or otherwise provides only sequential access (no splits).
|
boolean |
isRandom()
The
AbstractStarTable implementation of this method
returns false . |
getColumnCount, getColumnInfo, getColumnReadStore, getInputColumn, getParquetFileReader, getRowCount, getSchema
checkedLongToInt, getColumnAuxDataInfos, getName, getParameters, getURL, setName, setParameters, setURL
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParameterByName, setParameter
public CachedParquetStarTable(IOSupplier<ParquetFileReader> pfrSupplier, int nthread) throws java.io.IOException
pfrSupplier
- access to parquet data filenthread
- number of threads to use for concurrent column reads;
if <=0, a value is chosen based on the number
of available processorsjava.io.IOException
public boolean isRandom()
AbstractStarTable
AbstractStarTable
implementation of this method
returns false
.isRandom
in interface StarTable
isRandom
in class AbstractStarTable
true
if table random access methods are availablepublic RowSequence getRowSequence() throws java.io.IOException
StarTable
getRowSequence
in interface StarTable
getRowSequence
in class AbstractStarTable
java.io.IOException
- if there is an error providing accesspublic RowAccess getRowAccess() throws java.io.IOException
StarTable
getRowAccess
in interface StarTable
getRowAccess
in class AbstractStarTable
java.io.IOException
- if there is an error setting up accesspublic RowSplittable getRowSplittable() throws java.io.IOException
AbstractStarTable
It is often possible to provide a better implementation than this.
getRowSplittable
in interface StarTable
getRowSplittable
in class AbstractStarTable
Tables.getDefaultRowSplittable(this)
java.io.IOException
RowRunner
public java.lang.Object getCell(long irow, int icol) throws java.io.IOException
AbstractStarTable
AbstractStarTable
implementation of this method
throws an UnsupportedOperationException
,
since unless otherwise provided there is no random access.getCell
in interface StarTable
getCell
in class AbstractStarTable
irow
- the index of the cell's rowicol
- the index of the cell's columnjava.io.IOException
- if there is an error reading the datapublic java.lang.Object[] getRow(long irow) throws java.io.IOException
AbstractStarTable
AbstractStarTable
implementation of this method
constructs a row by repeated invocation of AbstractStarTable.getCell(long, int)
.getRow
in interface StarTable
getRow
in class AbstractStarTable
irow
- the index of the row to retrieveirow
java.io.IOException
- if there is an error reading the datapublic void close() throws java.io.IOException
AbstractStarTable
AbstractStarTable
implementation of this method
does nothing.close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in interface StarTable
close
in class AbstractStarTable
java.io.IOException