Skip to content

[improvement](routine-load) Make routine load work with old kafka version#7630

Merged
caiconghui merged 6 commits intoapache:masterfrom
caiconghui:kafka
Jan 10, 2022
Merged

[improvement](routine-load) Make routine load work with old kafka version#7630
caiconghui merged 6 commits intoapache:masterfrom
caiconghui:kafka

Conversation

@caiconghui
Copy link
Contributor

@caiconghui caiconghui commented Jan 6, 2022

Proposed changes

Close related #7629 (replace it with issue number if it exists).

Describe the overview of changes, and introduce why we need it.

Types of changes

What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)
  • Code refactor (Modify the code structure, format the code, etc...)
  • Optimization. Including functional usability improvements and performance improvements.
  • Dependency. Such as changes related to third-party components.
  • Other.

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have created an issue on (Fix [Enhancement] Make routine load works with old kafka version #7629) and described the bug/feature there in detail
  • Compiling and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • If these changes need document changes, I have updated the document
  • Any dependent changes have been merged

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

RETURN_IF_ERROR(set_conf("statistics.interval.ms", "0"));
RETURN_IF_ERROR(set_conf("auto.offset.reset", "error"));
RETURN_IF_ERROR(set_conf("api.version.request", "true"));
RETURN_IF_ERROR(set_conf("api.version.request", config::kafka_api_version_request));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is It correct when api.version.request=true and broker.version.fallback=0.9 for new version of libdfkafka

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
I will set broker.version.fallback=0.10.0 for default

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great ~


BloomFilter/Min/Max and other statistical information cache capacity

### `kafka_api_version_request`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@caiconghui caiconghui changed the title [improvement](routine-load) Make routine load works with old kafka version [improvement](routine-load) Make routine load work with old kafka version Jan 6, 2022
1. 支持无认证的 Kafka 访问,以及通过 SSL 方式认证的 Kafka 集群。
2. 支持的消息格式为 csv, json 文本格式。csv 每一个 message 为一行,且行尾**不包含**换行符。
3. 仅支持 Kafka 0.10.0.0(含) 以上版本。
3. 仅支持 Kafka 0.10.0.0(含) 以上版本。如果要使用 Kafka 0.10.0.0 以下版本 (0.9.0, 0.8.2, 0.8.1, 0.8.0),需要修改 be 的配置,将 kafka_api_version_request 的值设置为false,将 kafka_broker_version_fallback 的值设置为要兼容的旧版本,使用旧版本的代价是routine load 的部分新特性无法使用,如根据时间设置 kafka 分区的 offset。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. 仅支持 Kafka 0.10.0.0(含) 以上版本。如果要使用 Kafka 0.10.0.0 以下版本 (0.9.0, 0.8.2, 0.8.1, 0.8.0),需要修改 be 的配置,将 kafka_api_version_request 的值设置为false,将 kafka_broker_version_fallback 的值设置为要兼容的旧版本,使用旧版本的代价是routine load 的部分新特性无法使用,如根据时间设置 kafka 分区的 offset。
3. 默认支持 Kafka 0.10.0.0(含) 以上版本。如果要使用 Kafka 0.10.0.0 以下版本 (0.9.0, 0.8.2, 0.8.1, 0.8.0),需要修改 be 的配置,将 kafka_api_version_request 的值设置为false,将 kafka_broker_version_fallback 的值设置为要兼容的旧版本,使用旧版本的代价是routine load 的部分新特性无法使用,如根据时间设置 kafka 分区的 offset。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

EmmyMiao87
EmmyMiao87 previously approved these changes Jan 6, 2022
Copy link
Contributor

@EmmyMiao87 EmmyMiao87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jan 6, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2022

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2022

PR approved by anyone and no changes requested.

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Jan 7, 2022
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jan 10, 2022
@caiconghui caiconghui merged commit 83f6eef into apache:master Jan 10, 2022
@caiconghui caiconghui deleted the kafka branch March 12, 2022 01:31
Henry2SS pushed a commit to Henry2SS/incubator-doris that referenced this pull request Mar 16, 2022
…sion (apache#7630)

Co-authored-by: caiconghui1 <caiconghui1@jd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/routine load kind/improvement reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] Make routine load works with old kafka version

3 participants