Skip to content

Milestone 2 Run Client

Mangirish Wagle edited this page Feb 28, 2016 · 5 revisions

Team Apex - Remote Job Runner REST API Client

Team Members:

  • Gourav Shenoy
  • Mangirish Wagle
  • Erika Dsouza

Instructions to run client

A command line client has been developed to consume REST APIs provided by the Web Application. Following guide will run you through the step by step instructions to run the REST client that calls the REST APIs from the Web Application.

Prerequisites

How to run client

  • Navigate to the client project directory SGA_Apex_Client.
  • In the target directory of the client project, find the executable ScienceGatewayApexClient-0.1.0.jar. Now execute this jar with the following command:
$ java -jar ScienceGatewayApexClient-0.1.0.jar localhost
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Please enter your choice: 
 1 - Submit job 
 2 - Monitor job 
 3 - Cancel job 
 4 - Get job status
 5 - Get job output file 
 6 - exit
  • Submit a job:
Please enter your choice: 
 1 - Submit job 
 2 - Monitor job 
 3 - Cancel job 
 4 - Get job status
 5 - Get job output file 
 6 - exit

1
Please enter the number of processors.
2
Please enter the email id
mawagle@iu.edu
Please enter the number of nodes.
2
Please enter the wall time
30
Please enter the job name
mawagle-01
Status code 200
{"submitJobResponse": {
  "jobId": "1245132.m2",
  "status": "Submitted"
}}
  • Monitor Job:
Please enter your choice: 
 1 - Submit job 
 2 - Monitor job 
 3 - Cancel job 
 4 - Get job status
 5 - Get job output file 
 6 - exit

2
Please enter the job id
1245132.m2
Status code 200
{"simpleAPIResponse": {
  "message": "Submitted request to monitor job [1245132.m2]. You should now receive emails providing you more information about the status of your submitted job.",
  "status": 202
}}

You should receive an email notification on the id that you provide during job submission.

  • Get Job Status
Please enter your choice: 
 1 - Submit job 
 2 - Monitor job 
 3 - Cancel job 
 4 - Get job status
 5 - Get job output file 
 6 - exit

4
Please enter the job id
1245132.m2
Status code 200
{"jobResponse": {
  "queue": "serial",
  "requiredMemory": "--",
  "numProcessors": 4,
  "jobId": "1245132.m2",
  "status": "Queued",
  "numNodes": 2,
  "requiredTime": "00:00:30",
  "userName": "mawagle",
  "jobName": "mawagle-01",
  "elapsedTime": "--"
}}
  • Cancel Job:
Please enter your choice: 
 1 - Submit job 
 2 - Monitor job 
 3 - Cancel job 
 4 - Get job status
 5 - Get job output file 
 6 - exit

3
Please enter the job id
1245132.m2
Status code 200
{"simpleAPIResponse": {
  "message": "Submitted request to delete job [1245132.m2].",
  "status": 202
}}
  • Download output file
Please enter your choice: 
 1 - Submit job 
 2 - Monitor job 
 3 - Cancel job 
 4 - Get job status 
 5 - Get job output file 
 6 - exit

5
Please enter the job name
mawagle05

Status code 200
Hello World!
Running on Karst
Hello World!
Running on Karst
  • Exit client:
Please enter your choice: 
 1 - Submit job 
 2 - Monitor job 
 3 - Cancel job 
 4 - Get job status
 5 - Get job output file 
 6 - exit

6