Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[HTCondor-users] Cluster/Job not setting up via SOAP calls
- Date: Fri, 10 May 2013 14:40:13 +0530
- From: Mukherjee Arijit <mukherjee.arijit@xxxxxxx>
- Subject: [HTCondor-users] Cluster/Job not setting up via SOAP calls
Hi All
I'm trying to use the Condor SOAP interface
by enabling the SOAP parameters in condor_config (as per Section 4.5.1
of Condor manual). I've also followed the sequence of beginTransaction(),
newCluster(), newJob() followed by createJobTemplate() and submit(). But
the job doesn't seem to be submitted - I've checked it using commands from
the command line. I am using Condor 7.8, Axis2 (which makes the code little
bit different from what is available on the net on various blogs as they
used Axis 1) and Java 1.7 on a Ubuntu 11.10 host. Here's the code snippet:
String scheddLocation = "http://192.168.161.166:34317";
String owner
= "<my_user_id>";
String jobFileLocation
= "/home/<my user id>/work/dev/CondorWSClient/sample/example.sub";
try {
// Create the service stub
CondorScheddStub stub = new CondorScheddStub(scheddLocation);
// Begin a transaction, allow for 60 seconds between calls
BeginTransaction bg = new BeginTransaction();
bg.setDuration(60);
BeginTransactionResponse bgr = stub.beginTransaction(bg);
TransactionAndStatus status = bgr.getResponse();
logger.info("status code: " + status.getStatus().getCode().getValue());
Transaction trx = status.getTransaction();
logger.info("Transaction: " + trx.getId());
// Get a new cluster for the DAG job.
NewCluster nc = new NewCluster();
nc.setTransaction(trx);
NewClusterResponse ncr = stub.newCluster(nc);
int clusterId = ncr.getResponse().getInteger();
logger.info("Cluster ID: " + clusterId);
// Get a new Job ID (aka a ProcId) for the Condor Job
NewJob nj = new NewJob();
nj.setTransaction(trx);
nj.setClusterId(clusterId);
NewJobResponse njr = stub.newJob(nj);
int jobId = njr.getResponse().getInteger();
logger.info("Job ID: " + jobId);
// Build the job's ClassAd.
ClassAdStructAndStatus jobAd = buildJobAd(owner, jobFileLocation, stub,
clusterId, jobId);
// Now submit the JOB's ClassAd.
Submit submit = new Submit();
submit.setClusterId(clusterId);
submit.setJobId(jobId);
submit.setTransaction(trx);
submit.setJobAd(jobAd.getClassAd());
stub.submit(submit);
// Commit the transaction.
CommitTransaction comm = new CommitTransaction();
comm.setTransaction(trx);
stub.commitTransaction(comm);
// Ask the Schedd to kick off the JOB immediately.
RequestReschedule resched = new RequestReschedule();
stub.requestReschedule(resched);
} catch (AxisFault
ax) {
ax.printStackTrace();
} catch (RemoteException
rx) {
rx.printStackTrace();
}
The transaction ID returned by the beginTransaction()
call is a negative value, and changes at every invocation. But the clusterID
and jobID are always 0. There are no exceptions anywhere.
I've seen people in the mailing list
mentioning Aviary - but unfortunately, we cannot use Aviary right now.
In the short term, we need to set up this SOAP interface, and move to Aviary
at a later date.
Can anyone please let me know what am
I doing wrong?
Regards
Arijit
Arijit Mukherjee
Senior Scientist R&D; Innovation Lab
Tata Consultancy Services
Ph:- 913366367137
Cell:- 9903705285
Mailto: mukherjee.arijit@xxxxxxx
Website: http://www.tcs.com
____________________________________________
Experience certainty. IT Services
Business Solutions
Consulting
____________________________________________=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you