90 likes | 225 Vues
Queue Manager syntax. The queue manager (as implemented by Bamboo) utilizes the SSSRMAP message format v3 and the SSSRMAP Job object v3. The following describes the command syntax for the queue manager. Commands at a glance. Submit Job Modify Job Query Job(s) or Queue Start Job Signal Job
E N D
Queue Manager syntax • The queue manager (as implemented by Bamboo) utilizes the SSSRMAP message format v3 and the SSSRMAP Job object v3. • The following describes the command syntax for the queue manager.
Commands at a glance • Submit Job • Modify Job • Query Job(s) or Queue • Start Job • Signal Job • Cancel Job • Suspend Job • Resume Job • Checkpoint Job • Requeue Job • Administer Server
Submit/Modify Job Both “Submit” and “Modify” actions requires a “Job” object in the Data section. In the case of a modify only the “JobId” and items to be altered need to be present. The response is simply success or failure. <Request action="Submit"> <Object>Job</Object> <Data> <Job><InitialWorkingDirectory>/clusters/scl/brett</InitialWorkingDirectory> <Processors>32</Processors> <Requested><WallDuration>300</WallDuration></Requested> <OutputFile>t.out</OutputFile> <Actor>brett</Actor> <GroupId>scl</GroupId> <Environment><Variable name="PATH">/usr/local/sss/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin</Variable></Environment><Executable parallel="false">./mpitest.sh</Executable> </Job> </Data> </Request>
Query Job <Request action="Query"> <Object>Job</Object> <Get name="JobId"></Get> <Get name="JobState"></Get> <Get name="UserId"></Get> <Get name="Processors"></Get> <Get name="Delivered"></Get> <Get name="Requested"></Get> <Get name="NodeList"></Get> <Where name="JobClass">active</Where> </Request>
Query response <Response> <Status><Value>Success</Value><Code>000</Code> <Message>1 jobs found</Message></Status> <Count>1</Count> <Data type="xml"> <Job><JobId>3396</JobId> <JobState>idle</JobState> <UserId>brett</UserId> <Processors>32</Processors> <Delivered><WallDuration>0</WallDuration><NodeCount></NodeCount></Delivered> <Requested><WallDuration>300</WallDuration><NodeCount></NodeCount></Requested> <NodeList></NodeList> </Job> </Data> </Response>
Start Job • Start job requires the “JobId” and a “NodeList”. Response is success or failure. <Request action="Start"> <Object>Job</Object> <Data type="xml"> <Job><JobId>23423</JobId> <NodeList><Node>x1</Node><Node>x2</Node></NodeList> </Job> </Data> </Request>
Signal Job • Simple unix style signals. Response contains success or failure. <Request action="Signal"> <Object>Job</Object> <Set name="Signal">SIGTERM</Set> <Where name="JobId">2293</Where> </Request>
Cancel/Suspend/Resume/Checkpoint • All are simple commands requiring just a “JobId” and returning success or failure. <Request action="Cancel"> <Object>Job</Object> <Where name="JobId">3395</Where> </Request>
Authorization • Bamboo uses the authentication information in the SSSRMAP wire protocol to establish the user id making the request. (ex. Only the owner or a manager can signal/cancel/etc a job)