-
Notifications
You must be signed in to change notification settings - Fork 0
Add continuous consumer mode to Redis source, flush interval support, batch buffering, and non-blocking sources #5
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
Conversation
Co-authored-by: slhmy <31381093+slhmy@users.noreply.github.com>
|
@copilot Don't flush too quickly. Set a flush_interval, only flush when interval/size reached the limit. |
Co-authored-by: slhmy <31381093+slhmy@users.noreply.github.com>
Added flush interval support with two configurable options:
When either condition is met, the sink is flushed. If neither is configured, flushing only happens at the end (previous behavior preserved). Implemented in commit a3df47d with comprehensive tests. |
|
@copilot Only write batches(parquet file)when flush needed |
Co-authored-by: slhmy <31381093+slhmy@users.noreply.github.com>
Implemented batch buffering - batches are now buffered in memory and Parquet files are written only when Changes:
Benefits:
Implemented in commit 47b045d with 6 comprehensive tests. |
|
@copilot |
Co-authored-by: slhmy <31381093+slhmy@users.noreply.github.com>
Made Changes:
Benefit: Time-based flushes ( Implemented in commit c7327b8 with 4 comprehensive tests. |
|
@copilot |
Could you provide more details about which tests are failing? I'm currently unable to install dependencies due to network issues, but I can fix specific test failures if you can share:
This will help me address the issues more efficiently.
Fixed tests to handle the non-blocking behavior where sources yield Issue: Tests expected only real batches, but with non-blocking sources, Fixed tests:
All now correctly assert that Implemented in commit adcb903. |
Co-authored-by: slhmy <31381093+slhmy@users.noreply.github.com>
|
Fix |
Co-authored-by: slhmy <31381093+slhmy@users.noreply.github.com>
Fixed Python 3.9 compatibility issue. The error was caused by using the union operator Change: Updated type hints to use
Tests should now collect and run successfully on Python 3.9. Implemented in commit ac97fed. |
Support continuous consumer for Redis source ✅
Implementation Complete
Recent Fix: Python 3.9 Compatibility
Fixed type hints to use
Optional[pa.RecordBatch]instead ofpa.RecordBatch | Nonefor Python 3.9 compatibility.Issue: CI was running on Python 3.9.24 which doesn't support the union operator
|for type hints (introduced in Python 3.10).Fixed files:
src/fs_data_sink/sources/redis_source.pysrc/fs_data_sink/sources/kafka_source.pyChanged
Iterator[pa.RecordBatch | None]→Iterator[Optional[pa.RecordBatch]]Complete Feature Set
1. Continuous Consumer
continuousparameter (default:true)2. Flush Intervals
flush_interval_secondsflush_interval_batches3. Batch Buffering
4. Non-blocking Sources
Nonewhen no data availableConfiguration:
Python Compatibility: Python 3.9+
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.