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
Tool to reconstruct prod resources based on Micheal's clique layout (Not to be checked in) #2579
base: master
Are you sure you want to change the base?
Tool to reconstruct prod resources based on Micheal's clique layout (Not to be checked in) #2579
Conversation
private IdealState buildIdealState(String resourceName, Map<String, List<String>> preferenceLists) { | ||
IdealState idealState = new IdealState(resourceName); | ||
idealState.setStateModelDefRef(ClusterMapConfig.DEFAULT_STATE_MODEL_DEF); | ||
for (Map.Entry<String, List<String>> entry : preferenceLists.entrySet()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's explicitly set rebalance mode to semi auto, and the ideal state mode to auto, for now
for (String host : hosts) { | ||
String instanceName = ClusterMapUtils.getInstanceName(host, port); | ||
if (currentStates.containsKey(instanceName)) { | ||
List<String> partitions = currentStates.get(instanceName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let remove the instance name form the currentStates map and verify that the currentStates map is empty after the for loop to make sure the current states map has as many hosts as the resourceToHosts map.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2579 +/- ##
============================================
- Coverage 72.68% 72.05% -0.63%
- Complexity 11304 11407 +103
============================================
Files 801 806 +5
Lines 64163 65296 +1133
Branches 7827 7985 +158
============================================
+ Hits 46635 47050 +415
- Misses 14973 15660 +687
- Partials 2555 2586 +31
☔ View full report in Codecov by Sentry. |
No description provided.