Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

feat: add read limiter for hdfs #720

Merged
merged 4 commits into from
Jan 7, 2021

Conversation

hycdong
Copy link
Contributor

@hycdong hycdong commented Jan 6, 2021

What this pr solves

This pull request adds folly read limiter for hdfs, different from fds implementation, this pr uses BasicDynamicTokenBucket provided by folly to make it thread-safe to update limiter size dynamically.

Test

  • Unit test
  • Manual test
    I depoly one server supporting limiter(100M), the rest servers don't support limiter executing bulk load from hdfs, the result like the graph shows:
    image
    I also update limiter size dynamically: 100M -> 200M -> 50M
    image

Config changed

+ [replication]
+ hdfs_read_limit_rate_megabytes = 200

@hycdong hycdong added the type/config-change PR that made modification on configs, which should be noted in release note. label Jan 6, 2021
@hycdong hycdong marked this pull request as ready for review January 6, 2021 09:33
levy5307
levy5307 previously approved these changes Jan 6, 2021
@hycdong hycdong merged commit 76cdc50 into XiaoMi:master Jan 7, 2021
@hycdong hycdong deleted the add_hdfs_read_rate_limiter branch January 7, 2021 08:41
hycdong added a commit that referenced this pull request Jan 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/config-change PR that made modification on configs, which should be noted in release note.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants