Back to index

nordugrid-arc-nox  1.1.0~rc6
JobStateUNICORE.cpp
Go to the documentation of this file.
00001 #ifdef HAVE_CONFIG_H
00002 #include <config.h>
00003 #endif
00004 
00005 #include <arc/StringConv.h>
00006 #include "JobStateUNICORE.h"
00007 
00008 
00009 namespace Arc {
00010 
00011   JobState::StateType JobStateUNICORE::StateMap(const std::string& state) {
00012     if (Arc::lower(state) == "accepted")
00013       return JobState::ACCEPTED;
00014     else if (Arc::lower(state) == "queued")
00015       return JobState::QUEUING;
00016     else if (Arc::lower(state) == "running")
00017       return JobState::RUNNING;
00018     else if (Arc::lower(state) == "finished")
00019       return JobState::FINISHED;
00020     else if (Arc::lower(state) == "failed")
00021       return JobState::FAILED;
00022     else if (state == "")
00023       return JobState::UNDEFINED;
00024     else
00025       return JobState::OTHER;
00026   }
00027 
00028 }
00029 
00030 /*
00031    113      <xsd:enumeration value="UNDEFINED"/>
00032    114      <xsd:enumeration value="READY"/>
00033    115      <xsd:enumeration value="QUEUED"/>
00034    116      <xsd:enumeration value="RUNNING"/>
00035    117      <xsd:enumeration value="SUCCESSFUL"/>
00036    118      <xsd:enumeration value="FAILED"/>
00037    119      <xsd:enumeration value="STAGINGIN"/>
00038    120      <xsd:enumeration value="STAGINGOUT"/>
00039 
00040      UNICORE shows the following job states:
00041 
00042  * STAGINGIN - the server is staging in data from remote sites into the job directory
00043  * READY - job is ready to be started
00044  * QUEUED - job is waiting in the batch queue
00045  * RUNNING - job is running
00046  * STAGINGOUT - execution has finished, and the server is staging out data to remote sites
00047  * SUCCESSFUL - all finished, no errors occured
00048  * FAILED - errors occured in the execution and/or data staging phases
00049  * UNDEFINED - this state formally exists, but is not seen on clients
00050  */