Package gri.tasks.managers

Examples of gri.tasks.managers.JobSubmission


    JobManager jobManager = taskInfo.getJobManager();
   
    JobEntry job;
   
    try {
      JobSubmission submission = createJobSubmission();
      String jobId = jobManager.submitJob(submission);
      job = new JobEntry(submission.getTaskId(), jobId, jobManager);
    }
    catch(Exception e) {
      messenger.error(e);
      return;
    }
View Full Code Here


  protected JobSubmission createJobSubmission() throws Exception {
    String taskId = taskInfo.getTaskId();
    Map inputs = inputPanel.getValues();
    validateInputs(inputs);
    return new JobSubmission(taskId, inputs);
  }
View Full Code Here

       
        //System.out.println(jobManager.getTaskDefinition("echo-echo"));
        //if (true)
        //    return;
       
        JobSubmission job = new JobSubmission(null);

        job.setTaskId("echo-echo");
        job.setInput("text", "Hello There");
       
        //job.setTaskId("ping-ping");
        //job.setInput("computer", "file.genome.uc.edu");
       
        //job.setTaskId("type-type");
View Full Code Here

    public void writeWorkflow(WorkflowSubmission wkfl, Element elem) throws IOException {
  Element jobsElem = new Element("jobs");
 
  List jobSubmissions = wkfl.getJobs();
  for (int jobIndex=0; jobIndex<jobSubmissions.size(); jobIndex++) {
      JobSubmission job = (JobSubmission)jobSubmissions.get(jobIndex);
     
      Element jobElem = new Element("job");
      JobSubmissionSerializer serializer = serializers
        .getJobSubmissionSerializer(jobIndex, job.getTaskId(), config);
      serializer.write(job, jobElem);
     
      jobsElem.addContent(jobElem);
  }
 
View Full Code Here

     
      if (name.equals("job")) {
    String taskId = JobSubmissionSerializer.readTaskId(child);
    JobSubmissionSerializer serializer = serializers.
      getJobSubmissionSerializer(jobIndex, taskId, config);
    JobSubmission job = serializer.readJob(child);
    submission.addJob(job);
   
    jobIndex++;
      }
  }
View Full Code Here

                       
            JobSubmissionSerializer jobSerializer = serializers
              .getTaskSerializerSet(jobManager, taskId)
              .getJobSubmissionSerializer(config);
           
            JobSubmission job = jobSerializer.readJob(rootElem);
            job.setContextParam("WORKING_DIRECTORY", workDir);

            //submit:
            String jobKey = jobManager.submitJob(job);
            logger.debug("Job submitted: " + jobKey);
           
View Full Code Here

  JobSubmission submission = new JobSubmission("dan.encryption.Digest.md5");
  submission.setInput("message", "dude");
  */ 

 
  JobSubmission submission = new JobSubmission("Workflow");
  List tasks = new ArrayList();
 
  TaskStub task1 = new TaskStub("0", "dan.encryption.Digest.md5");
  task1.setInput("message", "dude");
  tasks.add(task1);

  TaskStub task2 = new TaskStub("1", "dan.encryption.Digest.md5");
  task2.setInput("message", new TaskStubOutputReference(task1, "digest"));
  tasks.add(task2);
 
  submission.setInput("inputTasks", tasks);
 
 
  //submit job:
  String jobId = jobManager.submitJob(submission);
 
View Full Code Here

   
    protected static WorkflowSubmission createSimpleWorkflow() {
 
  WorkflowSubmission wkfl = new WorkflowSubmission();
 
  JobSubmission job1 = new JobSubmission("dan.encryption.Digest.md5");
  job1.setInput("message", "dude");
  wkfl.addJob(job1);

  JobSubmission job2 = new JobSubmission("dan.encryption.Digest.md5");
  job2.setInput("message", "dude");
  job2.setInput("message", new WorkflowOutputReference(0, "digest"));
  wkfl.addJob(job2);
 
  return wkfl;
    }
View Full Code Here

    }
   
    protected static WorkflowSubmission createFileWorkflow() {
  WorkflowSubmission wkfl = new WorkflowSubmission();
 
  JobSubmission job1 = new JobSubmission("dan.encryption.Digest.digestToHex");
  job1.setInput("file", new TextMemFile("input1.txt", "dude"));
  job1.setInput("algorithm", "MD5");
  wkfl.addJob(job1);
 
  JobSubmission job2 = new JobSubmission("dan.encryption.Digest.digestToHex");
  job2.setInput("file", new TextMemFile("input2.txt", "dude"));
  job2.setInput("algorithm", "MD5");
  wkfl.addJob(job2);
 
  return wkfl;
    }
View Full Code Here

            WorkflowSubmission wkfl = wkflSerializer.readWorkflow(rootElem);
            wkfl.setContextParam("WORKING_DIRECTORY", workDir);

            List jobs = wkfl.getJobs();
            for (int i=0; i<jobs.size(); i++) {
          JobSubmission job = (JobSubmission)jobs.get(i);
         
          String jobId = "job_" + (i+1);
          File subWorkDir = new File(workDir, jobId);
         
          job.setContextParam("WORKING_DIRECTORY", subWorkDir);
            }
           
            //submit:
            String wkflId = wkflManager.submitWorkflow(wkfl);
            logger.debug("Workflow submitted: " + wkflId);
View Full Code Here

TOP

Related Classes of gri.tasks.managers.JobSubmission

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.