Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(java): add blocked stream utils #1617

Merged
merged 5 commits into from
May 9, 2024

Conversation

chaokunyang
Copy link
Collaborator

@chaokunyang chaokunyang commented May 9, 2024

What does this PR do?

Native stream is not feasible for every cases, this PR add blocked stream utils to adapt to streaming API.

This is s serialization helper as the fallback of streaming serialization/deserialization in FuryInputStream/FuryReadableChannel.

FuryInputStream/FuryReadableChannel will buffer and read more data, which makes the original passed stream when constructing FuryInputStream not usable. If this is not possible, use this BlockedStreamUtils instead for streaming serialization and deserialization.

Note that this mode will disable streaming in essence. It's just a helper for make the usage in streaming interface more easily. The deserialization will read whole bytes before do the actual deserialization, which don't have any streaming behaviour under the hood.

Related issues

#1451

Does this PR introduce any user-facing change?

  • Does this PR introduce any public API change?
  • Does this PR introduce any binary protocol compatibility change?

Benchmark

@chaokunyang chaokunyang merged commit 58bdf3e into apache:main May 9, 2024
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants