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

RSQLDB support submit streams task in SDK #85

Open
ni-ze opened this issue Mar 10, 2023 · 0 comments
Open

RSQLDB support submit streams task in SDK #85

ni-ze opened this issue Mar 10, 2023 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ni-ze
Copy link
Collaborator

ni-ze commented Mar 10, 2023

在目前的版本中,还没有实现客户端,仅暴露HTTP接口作为提交、管理流处理任务用。需要一个client的方式提交SQL,这样用于可以依赖这个client SDK直接提交流计算任务。另外,目前流处理任务的数据处理流向是,RocketMQ(源数据) -> RSQLDB ->RocketMQ(结果数据),也就是说RSQLDB将流处理结果数据会写回到RocketMQ的另一个topic中。在某些使用场景中,使用者希望能将计算结果数据返回到客户端,而不是写入到topic中,因此也需要通过client SDK将计算结果返回;

  1. 将计算结果写入到Topic中,已经实现:
CREATE TABLE `rocketmq_source`
(
  field_1 INT,
  field_2 VARCHAR,
  field_3 VARCHAR,
  field_4 VARCHAR
) WITH (
    topic = 'rsqldb-source',
    data_format='json'
    );


CREATE TABLE `task_sink_2`
(
  field_1 INT,
  field_2 VARCHAR,
  field_3 VARCHAR,
  field_4 VARCHAR
) WITH (
    topic = 'rsqldb-sink',
    data_format='json'
    );

//将计算结果写入到task_sink_2对应topic rsqldb-sink中
insert into task_sink_2
select field_1, sum(field_2) 
from rocketmq_source where field_1=1;
  1. 将计算结果返回给客户端,未实现:
CREATE TABLE `rocketmq_source`
(
  field_1 INT,
  field_2 VARCHAR,
  field_3 VARCHAR,
  field_4 VARCHAR
) WITH (
    topic = 'rsqldb-source',
    data_format='json'
    );


//将计算结果返回给客户端
select field_1, sum(field_2) 
from rocketmq_source where field_1=1 EMIT CHANGES;
@ni-ze ni-ze added enhancement New feature or request help wanted Extra attention is needed labels Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant