public synchronized ValidationResponse validate(StackAdvisorRequest request)
      throws StackAdvisorException {
      requestId = generateRequestId();

    // TODO, need frontend to pass the Service Name that was modified.
    // For now, hardcode.
    // Once fixed, change StackAdvisorHelperTest.java to use the actual service name.
    String serviceName = "ZOOKEEPER";
    ServiceInfo.ServiceAdvisorType serviceAdvisorType = getServiceAdvisorType(request.getStackName(), request.getStackVersion(), serviceName);
    StackAdvisorCommand<ValidationResponse> command = createValidationCommand(serviceName, request);

    return command.invoke(request, serviceAdvisorType);
  }
Returns validation (component-layout or configurations) result for the
request.

@param request the validation request
@return {@link ValidationResponse} instance
@throws StackAdvisorException in case of stack advisor script errors
ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorHelper.java