class ComputationalServiceImpl implements ComputationalService {

	@BudgetLimited
	@Override
	public void startSparkCluster(UserInfo userInfo, String expName, String compName, @Project String project) {
		final UserInstanceDTO userInstance =
				exploratoryDAO.fetchExploratoryFields(userInfo.getName(), project, expName, true);
		final UserInstanceStatus requiredStatus = UserInstanceStatus.STOPPED;
		if (computationalWithStatusResourceExist(compName, userInstance, requiredStatus)) {
			log.debug("{} spark cluster {} for userInstance {}", STARTING.toString(), compName, expName);
			updateComputationalStatus(userInfo.getName(), project, expName, compName, STARTING);
			EndpointDTO endpointDTO = endpointService.get(userInstance.getEndpoint());
			final String uuid =
					provisioningService.post(endpointDTO.getUrl() + ComputationalAPI.COMPUTATIONAL_START_SPARK,
							userInfo.getAccessToken(),
							requestBuilder.newComputationalStart(userInfo, userInstance, compName, endpointDTO),
							String.class);
			requestId.put(userInfo.getName(), uuid);
		} else {
			throw new IllegalStateException(String.format(DATAENGINE_NOT_PRESENT_FORMAT,
					requiredStatus.toString(), compName, expName));
		}
	}

	@Inject public  ComputationalServiceImpl(ProjectService projectService, ExploratoryDAO exploratoryDAO, ComputationalDAO computationalDAO,
									@Named(ServiceConsts.PROVISIONING_SERVICE_NAME) RESTService provisioningService,
									RequestBuilder requestBuilder, RequestId requestId, TagService tagService,
									EndpointService endpointService, InfrastructureTemplateService templateService);

}