public void populateComponentMap() {
    componentHashMap = new HashMap<>();
    for (ModuleComponent moduleComponent : getComponents()){
      // set reverse lookup
      moduleComponent.setModule(this);

      componentHashMap.put(moduleComponent.getName(), moduleComponent);
    }
  }
Loads the components into a map (component name, component) for ease of access.
ambari-server/src/main/java/org/apache/ambari/server/state/Module.java