Search in sources :

Example 1 with NonInterruptibleBlockingBytesChannel

use of com.google.cloud.bigquery.connector.common.NonInterruptibleBlockingBytesChannel in project spark-bigquery-connector by GoogleCloudDataproc.

the class ArrowColumnBatchPartitionReaderContext method newArrowStreamReader.

private ArrowStreamReader newArrowStreamReader(InputStream fullStream) {
    BufferAllocator childAllocator = allocator.newChildAllocator("readerAllocator" + (closeables.size() - 1), 0, maxAllocation);
    closeables.add(childAllocator);
    return new ArrowStreamReader(new NonInterruptibleBlockingBytesChannel(fullStream), childAllocator, CommonsCompressionFactory.INSTANCE);
}
Also used : ArrowStreamReader(org.apache.arrow.vector.ipc.ArrowStreamReader) NonInterruptibleBlockingBytesChannel(com.google.cloud.bigquery.connector.common.NonInterruptibleBlockingBytesChannel) BufferAllocator(org.apache.arrow.memory.BufferAllocator)

Aggregations

NonInterruptibleBlockingBytesChannel (com.google.cloud.bigquery.connector.common.NonInterruptibleBlockingBytesChannel)1 BufferAllocator (org.apache.arrow.memory.BufferAllocator)1 ArrowStreamReader (org.apache.arrow.vector.ipc.ArrowStreamReader)1