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

Add authentication info parameter in the constructor of ZooKeeperDataSource to support authentication #508

Merged
merged 1 commit into from
Feb 26, 2019

Conversation

qinggeng2015
Copy link
Contributor

@qinggeng2015 qinggeng2015 commented Feb 21, 2019

The constructor method of ZooKeeperDataSource adds authentication information to support authentication.

Resolves #501

@CLAassistant
Copy link

CLAassistant commented Feb 21, 2019

CLA assistant check
All committers have signed the CLA.

@sczyh30
Copy link
Member

sczyh30 commented Feb 21, 2019

Hi, thanks for contributing. Could you please sign the CLA here?

@sczyh30 sczyh30 added the to-review To review label Feb 21, 2019
@sczyh30 sczyh30 changed the title The construction method of ZooKeeperDataSource adds authentication in… Add authentication info parameter in the constructor of ZooKeeperDataSource to support authentication Feb 21, 2019
@codecov-io
Copy link

codecov-io commented Feb 21, 2019

Codecov Report

Merging #508 into master will increase coverage by 0.11%.
The diff coverage is 75%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #508      +/-   ##
============================================
+ Coverage     37.66%   37.77%   +0.11%     
- Complexity     1099     1104       +5     
============================================
  Files           259      259              
  Lines          8159     8171      +12     
  Branches       1111     1113       +2     
============================================
+ Hits           3073     3087      +14     
+ Misses         4690     4688       -2     
  Partials        396      396
Impacted Files Coverage Δ Complexity Δ
...inel/datasource/zookeeper/ZookeeperDataSource.java 61.33% <75%> (+5.77%) 8 <1> (+4) ⬆️
...s/block/flow/controller/RateLimiterController.java 89.65% <0%> (+10.34%) 8% <0%> (+1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5b260a9...3b3c887. Read the comment docs.

@qinggeng2015
Copy link
Contributor Author

Hi, thanks for contributing. Could you please sign the CLA here?

Hello, signing done.

@sczyh30
Copy link
Member

sczyh30 commented Feb 26, 2019

Could you please illustrate your design in the PR description?

@qinggeng2015
Copy link
Contributor Author

Could you please illustrate your design in the PR description?

您好,在ZookeeperDataSource中增加了一个新的构造方法
public ZookeeperDataSource(final String serverAddr, final List<AuthInfo> authInfos, final String groupId, final String dataId,Converter<String, T> parser)
可以接收一个类型为List<AuthInfo>的参数,在创建zkClient时使用CuratorFrameworkFactory.builder().authorization()方法将authInfos添加到zkClient中。

另外在ZookeeperDataSourceTest中添加了一个测试方法testZooKeeperDataSourceAuthorization进行了验证。

Copy link
Member

@sczyh30 sczyh30 left a comment

Choose a reason for hiding this comment

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

LGTM

@sczyh30 sczyh30 merged commit ec0883d into alibaba:master Feb 26, 2019
@sczyh30
Copy link
Member

sczyh30 commented Feb 26, 2019

Nice, thanks for contributing!

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.

4 participants