private void fullyResolveCommonServices(
      Map<String, StackModule> stackModules, Map<String, ServiceModule> commonServiceModules, Map<String, ExtensionModule> extensions)
      throws AmbariException {
    for(ServiceModule commonService : commonServiceModules.values()) {
      if (commonService.getModuleState() == ModuleState.INIT) {
        commonService.resolveCommonService(stackModules, commonServiceModules, extensions);
      }
    }
  }
Fully resolve common services.

@param stackModules          map of stack id which contains name and version to stack module.
@param commonServiceModules  map of common service id which contains name and version to common service module.
@throws AmbariException if unable to resolve all common services
ambari-server/src/main/java/org/apache/ambari/server/stack/StackManager.java