You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/08/24 20:16:39 UTC

[GitHub] [helix] zhangmeng916 commented on pull request #1307: Add TrieClusterTopology for retrieving hierarchical topology

zhangmeng916 commented on pull request #1307:
URL: https://github.com/apache/helix/pull/1307#issuecomment-679343209


   > Seems to be similar to the current Topology.java design. Why we need a new class?
   > If anything missed in Topology.java, we can add new methods there to read the tree and return the desired information.
   
   This class is purely to collect the instance configs and return to the users in the format they want. Helix has no logic involved in this part and we do not do any calculation. We considered topology, and the conclusion is that it will make both more complicated for now. Topology is mainly used for rebalancing purpose, and Helix adds default value if there is anything missing, and also Topology actually only supports two levels, as shown here:   
   
   public enum Types {
       ROOT,
       ZONE,
       INSTANCE
     }
   
   Although other levels keys are inserted in the tree, they're ignored during further calculation. This guideline is hard coded everywhere through that class. If we're going to change that, it's basically rewriting it.
   Another big issue is that Topology is tightly coupled with `faultZoneType` in different logic. But the new API totally ignore that field. 
   Although in the long run we may consolidate two classes, the prerequisite will be topology can support real multiple level (more than 2) hierarchy without hardcoding anything.
   Trie data structure is more suitable for this use case regarding simpleness and efficiency. This class will only be used when users query domain information for the cluster or for any specific domain.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org