clusterJob.setStatusMessage("Paused by user."); clusterStore.writeClusterJob(clusterJob); } finally {
clusterJob.setStatusMessage("Resumed by user."); clusterStore.writeClusterJob(clusterJob);
LOG.error("Exception while expanding macros for task {}", task.getTaskId(), e); taskService.failTask(task, -1); job.setStatusMessage("Exception while expanding macros: " + e.getMessage());
/** * Sets the status of the given job to {@link ClusterJob.Status#FAILED} and the status of the cluster to some given * status. * * @param job Job to fail. * @param cluster Cluster to set the status for. * @param status Status to set the cluster to. * @param message Error message. * @throws IOException * @throws IllegalAccessException */ public void failJobAndSetClusterStatus(ClusterJob job, Cluster cluster, Cluster.Status status, String message) throws IOException, IllegalAccessException { cluster.setStatus(status); clusterStore.writeCluster(cluster); job.setJobStatus(ClusterJob.Status.FAILED); if (message != null) { job.setStatusMessage(message); } clusterStore.writeClusterJob(job); serverStats.getFailedClusterStats().incrementStat(job.getClusterAction()); callbackQueues.add(cluster.getAccount().getTenantId(), new Element(gson.toJson(new CallbackData(CallbackData.Type.FAILURE, cluster, job)))); }
clusterJob.setStatusMessage("Aborted by user."); clusterStore.writeClusterJob(clusterJob);