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 HelixVcrCluster and HelixVcrClusterFactory. #1158

Merged
merged 2 commits into from
May 1, 2019

Conversation

zzmao
Copy link
Contributor

@zzmao zzmao commented Apr 17, 2019

Add HelixVcrCluster and HelixVcrClusterFactory.

@zzmao
Copy link
Contributor Author

zzmao commented Apr 17, 2019

There will be another PR for ReplicationEngine to dynamically add/remove partition.
For now, it's just a one time assignment.

Copy link
Contributor

@lightningrob lightningrob left a comment

Choose a reason for hiding this comment

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

First round of review comments. I need to understand the Helix messaging a bit better.

@codecov-io
Copy link

codecov-io commented Apr 18, 2019

Codecov Report

Merging #1158 into master will decrease coverage by 0.05%.
The diff coverage is 72.44%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1158      +/-   ##
============================================
- Coverage     69.84%   69.78%   -0.06%     
- Complexity     5316     5332      +16     
============================================
  Files           420      425       +5     
  Lines         32547    32644      +97     
  Branches       4139     4147       +8     
============================================
+ Hits          22732    22782      +50     
- Misses         8695     8724      +29     
- Partials       1120     1138      +18
Impacted Files Coverage Δ Complexity Δ
...om.github.ambry.cloud/StaticVcrClusterFactory.java 87.5% <ø> (+9.72%) 2 <0> (ø) ⬇️
.../java/com.github.ambry.cloud/StaticVcrCluster.java 76.19% <0%> (-3.81%) 6 <0> (ø)
...com.github.ambry.cloud/HelixVcrClusterMetrics.java 100% <100%> (ø) 1 <1> (?)
....github.ambry.cloud/HelixVcrStateModelFactory.java 100% <100%> (ø) 2 <2> (?)
...com.github.ambry.cloud/HelixVcrClusterFactory.java 63.63% <63.63%> (ø) 2 <2> (?)
...ava/com.github.ambry.cloud/HelixVcrStateModel.java 69.56% <69.56%> (ø) 5 <5> (?)
...n/java/com.github.ambry.cloud/HelixVcrCluster.java 71.69% <71.69%> (ø) 10 <10> (?)
.../main/java/com.github.ambry.store/ScanResults.java 81.25% <0%> (-3.13%) 16% <0%> (-2%)
...java/com.github.ambry.store/CompactionManager.java 87.33% <0%> (-2.67%) 19% <0%> (ø)
...github.ambry.rest/AsyncRequestResponseHandler.java 88.59% <0%> (-2.29%) 23% <0%> (ø)
... and 11 more

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 19f3c2e...d20c34d. Read the comment docs.

private final HelixManager manager;
private final HelixAdmin helixAdmin;
private final Map<String, PartitionId> partitionIdMap;
private final Set<PartitionId> assignedPartitionIds = new ConcurrentHashMap<PartitionId, Boolean>().newKeySet();
Copy link
Contributor

Choose a reason for hiding this comment

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

can just make this ConcurrentHashMap.newKeySet(); it's a static method

* Helix Based VCR Cluster.
*/
public class HelixVcrCluster implements VirtualReplicatorCluster {
private final static Logger logger = LoggerFactory.getLogger(HelixVcrCluster.class);
Copy link
Contributor

Choose a reason for hiding this comment

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

private static final

@lightningrob
Copy link
Contributor

A few minor style comments, we can merge after addressing those.

@lightningrob lightningrob merged commit ee10484 into linkedin:master May 1, 2019
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