Class CodecTransfer<T>
java.lang.Object
com.illumon.iris.db.v2.parquet.transfer.CodecTransfer<T>
- All Implemented Interfaces:
TransferObject<org.apache.parquet.io.api.Binary[]>,SafeCloseable,AutoCloseable
public class CodecTransfer<T>
extends Object
implements TransferObject<org.apache.parquet.io.api.Binary[]>
-
Constructor Summary
ConstructorsConstructorDescriptionCodecTransfer(ColumnSource<T> columnSource, io.deephaven.util.codec.ObjectCodec<? super T> codec, int targetSize) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidfetchData(OrderedKeys rs) Copy the data from the upstreamColumnSourceinto this object in preparation for writingorg.apache.parquet.io.api.Binary[]Get 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 toTransferObject.fetchData(OrderedKeys)this may be called to append statistic information into the Parquet footer for readers.
-
Constructor Details
-
CodecTransfer
public CodecTransfer(@NotNull ColumnSource<T> columnSource, @NotNull io.deephaven.util.codec.ObjectCodec<? super T> codec, int targetSize)
-
-
Method Details
-
getBuffer
public org.apache.parquet.io.api.Binary[] getBuffer()Description copied from interface:TransferObjectGet the buffer suitable for writing to a Parquet file- Specified by:
getBufferin interfaceTransferObject<T>- Returns:
- the buffer
-
rowCount
public int rowCount()Description copied from interface:TransferObjectGet the number of rows contained within the current transfer set to be written- Specified by:
rowCountin interfaceTransferObject<T>- Returns:
- the number of rows that are ready to write to the Parquet file
-
fetchData
Description copied from interface:TransferObjectCopy the data from the upstreamColumnSourceinto this object in preparation for writing- Specified by:
fetchDatain interfaceTransferObject<T>- Parameters:
rs- theOrderedKeysto copy
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSafeCloseable
-
updateStatistics
public <T extends Comparable<T>> void updateStatistics(@NotNull org.apache.parquet.column.statistics.Statistics<T> stats) Description copied from interface:TransferObjectAfter a sequence of calls toTransferObject.fetchData(OrderedKeys)this may be called to append statistic information into the Parquet footer for readers.- Specified by:
updateStatisticsin interfaceTransferObject<T>
-