<groupName>hadoop</groupName> <userAgent>laptop</userAgent> <jobType>hadoop</jobType> <schedule>adHoc</schedule> <cmdArgs>fs -ls /</cmdArgs> </jobInfo> </request> ''' print payload return jobs.submitJob(serviceUrl, payload, 'application/xml') # driver method for all tests if __name__ == "__main__": print "Running unit tests:\n" testXmlSubmitjob() print "\n" while True: print jobs.getJobInfo(serviceUrl, jobID) print "\n" status = jobs.getJobStatus(serviceUrl, jobID) print status print "\n" if (status != 'RUNNING') and (status != 'INIT'): print "Job has terminated - exiting" break time.sleep(5)
"userAgent" : "laptop", "jobType": "hadoop", "schedule": "adHoc", "cmdArgs":"jar hadoop-examples.jar sleep -m 1 -mt 1", "fileDependencies":"''' + GENIE_TEST_PREFIX + '''/hadoop-examples.jar" } } ''' print payload print "\n" return jobs.submitJob(serviceUrl, payload) # driver method for all tests if __name__ == "__main__": print "Running unit tests:\n" jobID = testJsonSubmitjob() print "\n" while True: print jobs.getJobInfo(serviceUrl, jobID) print "\n" status = jobs.getJobStatus(serviceUrl, jobID) print status print "\n" if (status != 'RUNNING') and (status != 'INIT'): print "Final status: ", status print "Job has terminated - exiting" break time.sleep(5)