mirror of
https://github.com/wassname/ray.git
synced 2026-09-12 12:51:15 +08:00
[Streaming] Support streaming flow control (#7152)
* streaming writer use event driven model. * add RefreshChannelInfo * fix name * minor changes according reviewer comments * Fix according to reviewer's comments * fix bazel lint * code polished * Add more comments * rename Stop & Start of EventQueue to Freeze and Unfreeze. * add override * fix * fix return value * support flow control * add flow control ut in mock transfer * minor changes according to comments * add java and python worker adaption Co-authored-by: wanxing <wanxing.wwx@alibaba-inc.com>
This commit is contained in:
@@ -33,6 +33,17 @@ class StreamingConfig {
|
||||
|
||||
std::string task_job_id_ = JobID::Nil().Hex();
|
||||
|
||||
// Default flow control type is unconsumed sequence flow control. More detail
|
||||
// introducation and implemention in ray/streaming/src/flow_control.h.
|
||||
streaming::proto::FlowControlType flow_control_type_ =
|
||||
streaming::proto::FlowControlType::UnconsumedSeqFlowControl;
|
||||
|
||||
// Default writer and reader consumed step.
|
||||
uint32_t writer_consumed_step_ = 1000;
|
||||
uint32_t reader_consumed_step_ = 100;
|
||||
|
||||
uint32_t event_driven_flow_control_interval_ = 1;
|
||||
|
||||
public:
|
||||
void FromProto(const uint8_t *, uint32_t size);
|
||||
|
||||
@@ -46,6 +57,12 @@ class StreamingConfig {
|
||||
DECL_GET_SET_PROPERTY(uint32_t, EmptyMessageTimeInterval, empty_message_time_interval_)
|
||||
DECL_GET_SET_PROPERTY(streaming::proto::OperatorType, OperatorType, operator_type_)
|
||||
DECL_GET_SET_PROPERTY(const std::string &, JobName, job_name_)
|
||||
DECL_GET_SET_PROPERTY(uint32_t, WriterConsumedStep, writer_consumed_step_)
|
||||
DECL_GET_SET_PROPERTY(uint32_t, ReaderConsumedStep, reader_consumed_step_)
|
||||
DECL_GET_SET_PROPERTY(streaming::proto::FlowControlType, FlowControlType,
|
||||
flow_control_type_)
|
||||
DECL_GET_SET_PROPERTY(uint32_t, EventDrivenFlowControlInterval,
|
||||
event_driven_flow_control_interval_)
|
||||
|
||||
uint32_t GetRingBufferCapacity() const;
|
||||
/// Note(lingxuan.zlx), RingBufferCapacity's valid range is from 1 to
|
||||
|
||||
Reference in New Issue
Block a user