[DS-6694][Master] Reduce the refresh resource interval of LowerWeight#6695
Conversation
CalvinKirs
left a comment
There was a problem hiding this comment.
It is best that the user can configure this parameter.
I thought about this problem, but it just a data transform in memory, it's pointless to configure this parameter. |
| this.lock = new ReentrantLock(); | ||
| this.executorService = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("LowerWeightHostManagerExecutor")); | ||
| this.executorService.scheduleWithFixedDelay(new RefreshResourceTask(), 0, 5, TimeUnit.SECONDS); | ||
| this.executorService.scheduleWithFixedDelay(new RefreshResourceTask(), 0, 1, TimeUnit.SECONDS); |
There was a problem hiding this comment.
Can we add listener to ServerNodeManager and register RefreshResourceTask as a listener so that we can immediately refresh the resources when ServerNodeManager updates the nodes?
There was a problem hiding this comment.
Good idea. I found that WorkerDataListener just handle add and remove event, but not update event.
I will try to add update event handle for it.
|
SonarCloud Quality Gate failed. |
…apache#6695) * [DS-6694][Master] Reduce the refresh resource interval of LowerWeight * add server node update event handle Co-authored-by: caishunfeng <534328519@qq.com>








this pr close #6694
Purpose of the pull request
Brief change log
Verify this pull request
This pull request is code cleanup without any test coverage.
(or)
This pull request is already covered by existing tests, such as (please describe tests).
(or)
This change added tests and can be verified as follows: