Interface TransferObject<B>
- Type Parameters:
B-
- All Superinterfaces:
AutoCloseable,SafeCloseable
- All Known Implementing Classes:
BooleanTransfer,ByteTransfer,CharTransfer,CodecTransfer,DoubleTransfer,FloatTransfer,IntTransfer,LongTransfer,ShortTransfer,StringTransfer
Classes that implement this interface are responsible for converting data from individual DH columns into buffers
to be written out to the Parquet file.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <DATA_TYPE>
TransferObject<?>create(Map<String, Map<ParquetCacheTags, Object>> computedCache, ReadOnlyIndex tableRowSet, ColumnSource<DATA_TYPE> columnSource, com.illumon.dataobjects.ColumnDefinition<DATA_TYPE> columnDefinition, int maxValuesPerPage, Class<DATA_TYPE> columnType, ParquetInstructions instructions) Create an appropriateTransferObjectto copy data from upstreamColumnSources into appropriate buffer format for a ParquetColumnWritervoidfetchData(OrderedKeys rs) Copy the data from the upstreamColumnSourceinto this object in preparation for writingGet the buffer suitable for writing to a Parquet fileintrowCount()Get the number of rows contained within the current transfer set to be written<T extends Comparable<T>>
voidupdateStatistics(org.apache.parquet.column.statistics.Statistics<T> stats) After a sequence of calls tofetchData(OrderedKeys)this may be called to append statistic information into the Parquet footer for readers.Methods inherited from interface com.illumon.util.SafeCloseable
close
-
Method Details
-
create
static <DATA_TYPE> TransferObject<?> create(@NotNull Map<String, Map<ParquetCacheTags, Object>> computedCache, @NotNull ReadOnlyIndex tableRowSet, @NotNull ColumnSource<DATA_TYPE> columnSource, @NotNull com.illumon.dataobjects.ColumnDefinition<DATA_TYPE> columnDefinition, int maxValuesPerPage, @NotNull Class<DATA_TYPE> columnType, @NotNull ParquetInstructions instructions) Create an appropriateTransferObjectto copy data from upstreamColumnSources into appropriate buffer format for a ParquetColumnWriter- Type Parameters:
DATA_TYPE-- Parameters:
computedCache-tableRowSet-columnSource-columnDefinition-maxValuesPerPage-columnType-instructions-- Returns:
-
getBuffer
B getBuffer()Get the buffer suitable for writing to a Parquet file- Returns:
- the buffer
-
rowCount
int rowCount()Get the number of rows contained within the current transfer set to be written- Returns:
- the number of rows that are ready to write to the Parquet file
-
fetchData
Copy the data from the upstreamColumnSourceinto this object in preparation for writing- Parameters:
rs- theOrderedKeysto copy
-
updateStatistics
<T extends Comparable<T>> void updateStatistics(@NotNull org.apache.parquet.column.statistics.Statistics<T> stats) After a sequence of calls tofetchData(OrderedKeys)this may be called to append statistic information into the Parquet footer for readers.- Type Parameters:
T-- Parameters:
stats-
-