@Override
  public String getAdvisorName(String serviceName) {
    if (getAdvisorFile() == null || serviceName == null)
      return null;

    File serviceDir = new File(getAbsolutePath());
    File stackVersionDir = serviceDir.getParentFile().getParentFile();
    File stackDir = stackVersionDir.getParentFile();

    String stackName = stackDir.getName();
    String versionString = stackVersionDir.getName().replaceAll("\\.", "");

    // Remove illegal python characters from the advisor name
    String advisorClassName = stackName + versionString + serviceName + "ServiceAdvisor";
    advisorClassName = advisorClassName.replaceAll("[^a-zA-Z0-9]+", "");

    return advisorClassName;
  }
Obtain the advisor name.

@return advisor name
ambari-server/src/main/java/org/apache/ambari/server/stack/StackServiceDirectory.java