public ExtensionInfo getExtension(String extensionName, String version) throws AmbariException {
    ExtensionInfo result = stackManager.getExtension(extensionName, version);

    if (result == null) {
      throw new StackAccessException("Extension " + extensionName + " " + version + " is not found in Ambari metainfo");
    }

    return result;
  }
Convenience method to get stack info from a stack id
@param stackId
           the stack id
@return  the stack info
@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java