}
public ApiRequest startComponents(String clusterName,
List<String> hostNames, List<String> components)
throws AmbariApiException {
ApiHostsRequest hostsRequest = new ApiHostsRequest();
ApiHostComponents apiComponents = new ApiHostComponents();
hostsRequest.setBody(apiComponents);
ApiComponentInfo hostRoles = new ApiComponentInfo();
hostRoles.setState("STARTED");
apiComponents.setHostRoles(hostRoles);
ApiHostsRequestInfo requestInfo = new ApiHostsRequestInfo();
hostsRequest.setRequestInfo(requestInfo);
requestInfo.setContext("Start Hosts components");
StringBuilder builder = new StringBuilder();
builder.append("HostRoles/host_name.in(");
for (String hostName : hostNames) {