Skip to content

Implement QueuedByteArrayInputStream #1663

@chernser

Description

@chernser

Describe the bug

There is com.clickhouse.data.stream.IterableByteArrayInputStream class that was intend to pipe queue of byte[] to output stream.
It uses iterator to fetch each "chunk" what is not memory/compute efficient if dealing with Queue because:

  • Queue.poll() would be much faster
  • Queue.poll() will remove reference to the already sent "chunk" so memory can be GC'd

There should be implementation of similar to IterableByteArrayInputStream that uses Queue benefits.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions