public ComponentInfo getComponentInfo(String component) {
    ComponentInfo componentInfo = null;
    String service = getServiceForComponent(component);
    if (service != null) {
      try {
        componentInfo = controller.getAmbariMetaInfo().getComponent(
            getName(), getVersion(), service, component);
      } catch (AmbariException e) {
        // just return null if component doesn't exist
      }
    }
    return componentInfo;
  }
Get info for the specified component.

@param component  component name

@return component information for the requested component
        or null if the component doesn't exist in the stack
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/Stack.java