Search in sources :

Example 11 with ImmediateService

use of org.objectweb.proactive.annotation.ImmediateService in project scheduling by ow2-proactive.

the class SchedulerFrontend method finishInErrorTask.

/**
 * {@inheritDoc}
 */
@Override
@ImmediateService
public boolean finishInErrorTask(String jobId, String taskName) throws NotConnectedException, UnknownJobException, UnknownTaskException, PermissionException {
    // checking permissions
    final JobId jobIdObject = JobIdImpl.makeJobId(jobId);
    frontendState.checkPermissions("finishTaskInError", frontendState.getIdentifiedJob(jobIdObject), YOU_DO_NOT_HAVE_PERMISSION_TO_FINISH_THIS_TASK);
    return schedulingService.finishInErrorTask(jobIdObject, taskName);
}
Also used : JobId(org.ow2.proactive.scheduler.common.job.JobId) ImmediateService(org.objectweb.proactive.annotation.ImmediateService)

Example 12 with ImmediateService

use of org.objectweb.proactive.annotation.ImmediateService in project scheduling by ow2-proactive.

the class SchedulerFrontend method getTaskServerLogsByTag.

@Override
@ImmediateService
public String getTaskServerLogsByTag(String jobId, String taskTag) throws UnknownJobException, NotConnectedException, PermissionException {
    JobId id = JobIdImpl.makeJobId(jobId);
    frontendState.checkPermissions("getTaskServerLogsByTag", frontendState.getIdentifiedJob(id), YOU_DO_NOT_HAVE_PERMISSION_TO_GET_THE_TASK_LOGS_OF_THIS_JOB);
    List<TaskState> lTaskState = frontendState.getJobState(id).getTasksByTag(taskTag);
    Set<TaskId> tasksIds = new HashSet<>(lTaskState.size());
    for (TaskState taskState : lTaskState) {
        tasksIds.add(taskState.getId());
    }
    return ServerJobAndTaskLogs.getJobLog(id, tasksIds);
}
Also used : TaskId(org.ow2.proactive.scheduler.common.task.TaskId) TaskState(org.ow2.proactive.scheduler.common.task.TaskState) JobId(org.ow2.proactive.scheduler.common.job.JobId) HashSet(java.util.HashSet) ImmediateService(org.objectweb.proactive.annotation.ImmediateService)

Aggregations

ImmediateService (org.objectweb.proactive.annotation.ImmediateService)12 JobId (org.ow2.proactive.scheduler.common.job.JobId)5 UnknownTaskException (org.ow2.proactive.scheduler.common.exception.UnknownTaskException)4 TaskId (org.ow2.proactive.scheduler.common.task.TaskId)3 TaskState (org.ow2.proactive.scheduler.common.task.TaskState)3 DatabaseManagerException (org.ow2.proactive.db.DatabaseManagerException)2 TaskCouldNotRestartException (org.ow2.proactive.scheduler.common.exception.TaskCouldNotRestartException)2 TaskCouldNotStartException (org.ow2.proactive.scheduler.common.exception.TaskCouldNotStartException)2 TaskSkippedException (org.ow2.proactive.scheduler.common.exception.TaskSkippedException)2 UnknownJobException (org.ow2.proactive.scheduler.common.exception.UnknownJobException)2 TaskResult (org.ow2.proactive.scheduler.common.task.TaskResult)2 UserIdentificationImpl (org.ow2.proactive.scheduler.job.UserIdentificationImpl)2 ImmutableSet (com.google.common.collect.ImmutableSet)1 KeyException (java.security.KeyException)1 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 LoginException (javax.security.auth.login.LoginException)1 RMNode (org.ow2.proactive.resourcemanager.rmnode.RMNode)1 AlreadyConnectedException (org.ow2.proactive.scheduler.common.exception.AlreadyConnectedException)1 JobAlreadyFinishedException (org.ow2.proactive.scheduler.common.exception.JobAlreadyFinishedException)1