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

Tool to reconstruct prod resources based on Micheal's clique layout (Not to be checked in) #2579

Draft
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

Arun-LinkedIn
Copy link
Contributor

No description provided.

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()) {
Copy link
Collaborator

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);
Copy link
Collaborator

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-commenter
Copy link

codecov-commenter commented Sep 26, 2023

Codecov Report

Attention: 353 lines in your changes are missing coverage. Please review.

Comparison is base (e4b4954) 72.68% compared to head (6c27b45) 72.05%.
Report is 36 commits behind head on master.

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     
Files Coverage Δ
...ustermap/HelixFullAutoReconstructResourceTool.java 0.00% <0.00%> (ø)

... and 100 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

None yet

3 participants