Back to index

nordugrid-arc-nox  1.1.0~rc6
JobStateCREAM.cpp
Go to the documentation of this file.
00001 #ifdef HAVE_CONFIG_H
00002 #include <config.h>
00003 #endif
00004 
00005 #include "JobStateCREAM.h"
00006 
00007 namespace Arc {
00008 
00009   JobState::StateType JobStateCREAM::StateMap(const std::string& state) {
00010     if (state == "REGISTERED")
00011       return JobState::ACCEPTED;
00012     else if (state == "PENDING")
00013       return JobState::ACCEPTED;
00014     else if (state == "RUNNING")
00015       return JobState::RUNNING;
00016     else if (state == "REALLY-RUNNING")
00017       return JobState::RUNNING;
00018     else if (state == "HELD")
00019       return JobState::HOLD;
00020     else if (state == "DONE-FAILED")
00021       return JobState::FAILED;
00022     else if (state == "DONE-OK")
00023       return JobState::FINISHED;
00024     else if (state == "ABORTED")
00025       return JobState::FAILED;
00026     else if (state == "CANCELLED")
00027       return JobState::KILLED;
00028     else if (state == "IDLE")
00029       return JobState::QUEUING;
00030     else if (state == "")
00031       return JobState::UNDEFINED;
00032     else
00033       return JobState::OTHER;
00034   }
00035 
00036 }
00037 /*
00038    A    CREAM JOB STATES
00039    Here below is provided a brief description of the meaning of each possible state a CREAM job can enter:
00040    • REGISTERED: the job has been registered but it has not been started yet.
00041    • PENDING the job has been started, but it has still to be submitted to the LRMS abstraction layer
00042       module (i.e. BLAH).
00043    • IDLE: the job is idle in the Local Resource Management System (LRMS).
00044    • RUNNING: the job wrapper, which “encompasses” the user job, is running in the LRMS.
00045    • REALLY-RUNNING: the actual user job (the one specified as Executable in the job JDL) is running
00046       in the LRMS.
00047    • HELD: the job is held (suspended) in the LRMS.
00048    • CANCELLED: the job has been cancelled.
00049    • DONE-OK: the job has successfully been executed.
00050    • DONE-FAILED: the job has been executed, but some errors occurred.
00051    • ABORTED: errors occurred during the “management” of the job, e.g. the submission to the LRMS
00052       abstraction layer software (BLAH) failed.
00053    • UNKNOWN: the job is an unknown status.
00054  */