> On Aug. 24, 2013, 4:35 a.m., Kishore Gopalakrishna wrote:
> > can we have separate packages for model, role, listeners ?
> > 
> > Lets avoid having strings, even things like cluster name, resource name, 
> > partition name should have concrete classes. Also having builder for every 
> > object is helpful. what do you think
> 
> Kanak Biscuitwala wrote:
>     - Package separation makes sense. Currently, there's only model and role 
> classes. I think a new discussion is necessary to decide how to do listeners 
> right (and more broadly, concrete use cases for this new API).
>     
>     - I agree with the string comment. Many (if not all) of the Map<String, 
> Obj> could be List/Set<Obj> instead and others can be Map<Obj1, Obj2>.
>     
>     - I think the following can be candidates for builders: Cluster, 
> Resource, Participant, and maybe CurState and ExtView. I can create a 
> separate Jira and work on those.
>     
>     I'm sure Jason has additional thoughts.

Some comments about the 2nd point: using Map instead of List/Set might be 
convenient since in many cases, we need to index 
ideal-state/current-state/message by id's. Agree to use Id instead of String, 
but it will be just a wrapper around string and we need to override equal() and 
hash() methods. To avoid code duplication, we may have an Id base class and 
ResourceId, ClusterId, ParticipantId, PartitionId, etc will be empty derived 
classes from Id class?


- Zhen


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/13754/#review25495
-----------------------------------------------------------


On Aug. 24, 2013, 1:33 a.m., Zhen Zhang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/13754/
> -----------------------------------------------------------
> 
> (Updated Aug. 24, 2013, 1:33 a.m.)
> 
> 
> Review request for helix, Kanak Biscuitwala, Kishore Gopalakrishna, and Shi 
> Lu.
> 
> 
> Repository: helix-git
> 
> 
> Description
> -------
> 
> Initial change for refactor helix model. Roughly follow the design at: 
> https://cwiki.apache.org/confluence/display/HELIX/API+Redesign
> 
> An example is shown in ClusterReader where using a Cluster instance, we can 
> retrieve any information needed for the rebalancer. The change is incomplete.
> 
> 
> Diffs
> -----
> 
>   helix-core/src/main/java/org/apache/helix/api/Cluster.java e69de29 
>   helix-core/src/main/java/org/apache/helix/api/ClusterReader.java e69de29 
>   helix-core/src/main/java/org/apache/helix/api/Controller.java e69de29 
>   helix-core/src/main/java/org/apache/helix/api/CurState.java e69de29 
>   helix-core/src/main/java/org/apache/helix/api/ExtView.java e69de29 
>   helix-core/src/main/java/org/apache/helix/api/HelixVersion.java e69de29 
>   helix-core/src/main/java/org/apache/helix/api/Msg.java e69de29 
>   helix-core/src/main/java/org/apache/helix/api/Participant.java e69de29 
>   helix-core/src/main/java/org/apache/helix/api/Partition.java e69de29 
>   helix-core/src/main/java/org/apache/helix/api/Resource.java e69de29 
>   helix-core/src/main/java/org/apache/helix/api/RunningInstance.java e69de29 
>   helix-core/src/main/java/org/apache/helix/api/Spectator.java e69de29 
> 
> Diff: https://reviews.apache.org/r/13754/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Zhen Zhang
> 
>

Reply via email to