private String doClusterCreate(YarnClient client, ApplicationId applicationId, String clusterId, String clusterDef,
String projectionType, Integer projectionDataAny, Map<String, Integer> hosts, Map<String, Integer> racks,
Map<String, Object> extraProperties) {
YarnContainerClusterOperations operations = buildClusterOperations(client, applicationId);
ContainerClusterCreateRequest request = new ContainerClusterCreateRequest();
request.setClusterId(clusterId);
request.setClusterDef(clusterDef);
request.setProjection(projectionType);
request.setExtraProperties(extraProperties);
ProjectionDataType projectionData = new ProjectionDataType();
projectionData.setAny(projectionDataAny);
projectionData.setHosts(hosts);
projectionData.setRacks(racks);
request.setProjectionData(projectionData);
operations.clusterCreate(request);
return "Cluster " + clusterId + " created.";
}