Uploaded image for project: 'Apache Helix'
  1. Apache Helix
  2. HELIX-599

Support creating/maintaining/routing resources with same names in different instance groups

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.6.5
    • None

    Description

      In LinkedIn, we have a new use scenario that there will be multiple databases sitting in the same Helix cluster with the same name, but on different instance groups. What we need are:

      1) Allow resources (databases) with the same name, these resources are on different instance groups (with different tags).

      2) Routing table (Spectator) is able to aggregate and return all instance (from multiple instance groups) that hold the database with given name.

      Our proposed solution is:

      1) Add a "Resource Group" field in IdealState for the databases with the same names from different instance groups

      2) Use Instance Group Tag (or new "Resource Tag") to differentiate databases (with same name) from different instance groups.

      3) Use name mangling for Idealstate, for example, with database TestDB in instance group "testGroup", the IdealState and ExternalView id would be "TestDB$testGroup".

      4) Change Helix Routing Table to be able to aggregate databases from the same resource group.

      Four new APIs are going to be added to RoutingTableProvider:

      public class RoutingTableProvider

      { /** * returns the instances that contain the given partition in a specific state from all resources with given resource name */ public List<InstanceConfig> getInstances(String resource, String partition, String state); /** * returns the instances that contain the given partition in a specific state from selected resources with given name and tags */ public List<InstanceConfig> getInstances(String resource, String partition, String state, List<String> resourceTags); /** * returns instances that contain given resource that are in a specific state */ public Set<InstanceConfig> getInstances(String resource, String state); /** * returns instances that contain given resource with tags that are in a specific state */ public Set<InstanceConfig> getInstances(String resource, String state, List<String> groupTags); }

      Attachments

        Activity

          People

            andrewlxia Lei Xia
            andrewlxia Lei Xia
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 168h
                168h
                Remaining:
                Remaining Estimate - 168h
                168h
                Logged:
                Time Spent - Not Specified
                Not Specified