Hi Iwan, The following works. package cn.cnic.sdc.zhxue.****; import java.io.File; import javax.xml.rpc.ServiceException; import condor.ClassAdAttrType; import birdbath.Schedd; public JobSubmission(String schedURL) throws
MalformedURLException,
ServiceException{ public static void main(String[] args) throws ServiceException,
FileNotFoundException, IOException {
JobSubmission subm = new JobSubmission(http://**.**:port); String user = "z*x**"; String cmd = "/bin/hostname"; String arg = null; String req = "machine!=\"***\""; //non sensitive to case String[] inputFiles = null; String outputFiles = "out"; String jobID; jobID = subm.submitJobs(user, cmd, arg, req, inputFiles, outputFiles, email); System.out.println(jobID); } public String submitJobs (String user, String cmd, String arg, String req, String[] inputFiles, String outputFiles, String email) throws FileNotFoundException, IOException { Transaction xact = schedd.createTransaction(); xact.begin(30); //System.out.println(schedd.getPort().newCluster(xact)); int cluster = xact.createCluster(); int job = xact.createJob(cluster); File[] iFiles = new File[inputFiles.length]; for (int i=0; i<inputFiles.length; i++) { iFiles[i] = new File(inputFiles[i]); } ClassAdStructAttr[] attr = {new ClassAdStructAttr("out",ClassAdAttrType.value3,outputFiles+cluster+"."+job) }; xact.submit(cluster, job, user, UniverseType.VANILLA, cmd, arg, req, attr, iFiles); xact.commit(); schedd.requestReschedule(); return cluster+"."+job; } } Cheers,
Zhenghua
发件人: iwan ariansyah
发送时间: 2010-06-09 16:46:56
收件人: zhxue
抄送:
主题:
hi,
i was also trying birdbath on my cluster but it doesnt work can i know your jsp main submit file May be you can help me Thanks in advance Iwan |