Package org.apache.oodt.cas.resource.structs

Examples of org.apache.oodt.cas.resource.structs.JobInput


    }

    private boolean genericExecuteJob(Hashtable jobHash, Object jobInput)
            throws JobException {
        JobInstance exec = null;
        JobInput in = null;
        try {
            Job job = XmlRpcStructFactory.getJobFromXmlRpc(jobHash);

            LOG.log(Level.INFO, "stub attempting to execute class: ["
                    + job.getJobInstanceClassName() + "]");

            exec = GenericResourceManagerObjectFactory
                    .getJobInstanceFromClassName(job.getJobInstanceClassName());
            in = GenericResourceManagerObjectFactory
                    .getJobInputFromClassName(job.getJobInputClassName());

            // load the input obj
            in.read(jobInput);

            // create threaded job
            // so that it can be interrupted
            RunnableJob runner = new RunnableJob(exec, in);
            Thread threadRunner = new Thread(runner);
View Full Code Here


        job.setJobInstanceClassName(instClass);
        job.setJobInputClassName(inputClassName);
        job.setQueueName(queue);
        job.setLoadValue(load);

        JobInput in = GenericResourceManagerObjectFactory
                .getJobInputFromClassName(inputClassName);
        if (inputConfigProps != null) {
            in.configure(inputConfigProps);
        }

        JobSpec spec = new JobSpec(in, job);

        return spec;
View Full Code Here

    private String genericHandleJob(Hashtable jobHash, Object jobIn)
            throws SchedulerException {

        Job exec = XmlRpcStructFactory.getJobFromXmlRpc(jobHash);
        JobInput in = GenericResourceManagerObjectFactory
                .getJobInputFromClassName(exec.getJobInputClassName());
        in.read(jobIn);

        JobSpec spec = new JobSpec(in, exec);

        // queue the job up
        String jobId = null;
View Full Code Here

    }

    private boolean genericHandleJob(Hashtable jobHash, Object jobIn,
            String urlStr) throws JobExecutionException {
        Job exec = XmlRpcStructFactory.getJobFromXmlRpc(jobHash);
        JobInput in = GenericResourceManagerObjectFactory
                .getJobInputFromClassName(exec.getJobInputClassName());
        in.read(jobIn);

        JobSpec spec = new JobSpec(in, exec);

        URL remoteUrl = safeGetUrlFromString(urlStr);
        ResourceNode remoteNode = null;
View Full Code Here

    public TestJobStack() {
        Job j1 = new Job();
        j1.setId("booger");
        j1.setName("pick it");

        JobInput in = null;

        job1 = new JobSpec(in, j1);

        Job j2 = new Job();
        j2.setId("booger2");
View Full Code Here

      Job actualJob = (Job) methodCallDetails.getArgs().get(0);
      assertEquals(spec.getJob().getJobInstanceClassName(), actualJob.getJobInstanceClassName());
      assertEquals(spec.getJob().getJobInputClassName(), actualJob.getJobInputClassName());
      assertEquals(spec.getJob().getQueueName(), actualJob.getQueueName());
      assertEquals(spec.getJob().getLoadValue(), actualJob.getLoadValue());
      JobInput actualJobInput = (JobInput) methodCallDetails.getArgs().get(1);
      assertEquals(spec.getIn().getClass(), actualJobInput.getClass());
      assertEquals(2, methodCallDetails.getArgs().size());

      OptionPropertyRegister.clearRegister();

      String url = "http://localhost:9000";
      cmdLineUtility.run(("--url http://localhost:9000"
            + " --operation --submitJob --def "
            + jobDefinitionFile + " --nodeUrl " + url).split(" "));
      methodCallDetails = client.getLastMethodCallDetails();
      assertEquals("submitJob", methodCallDetails.getMethodName());
      actualJob = (Job) methodCallDetails.getArgs().get(0);
      assertEquals(spec.getJob().getJobInstanceClassName(), actualJob.getJobInstanceClassName());
      assertEquals(spec.getJob().getJobInputClassName(), actualJob.getJobInputClassName());
      assertEquals(spec.getJob().getQueueName(), actualJob.getQueueName());
      assertEquals(spec.getJob().getLoadValue(), actualJob.getLoadValue());
      actualJobInput = (JobInput) methodCallDetails.getArgs().get(1);
      assertEquals(spec.getIn().getClass(), actualJobInput.getClass());
      assertEquals(new URL(url), methodCallDetails.getArgs().get(2));
      assertEquals(3, methodCallDetails.getArgs().size());
   }
View Full Code Here

    private String genericHandleJob(Hashtable jobHash, Object jobIn)
            throws SchedulerException {

        Job exec = XmlRpcStructFactory.getJobFromXmlRpc(jobHash);
        JobInput in = GenericResourceManagerObjectFactory
                .getJobInputFromClassName(exec.getJobInputClassName());
        in.read(jobIn);

        JobSpec spec = new JobSpec(in, exec);

        // queue the job up
        String jobId = null;
View Full Code Here

    }

    private boolean genericHandleJob(Hashtable jobHash, Object jobIn,
            String urlStr) throws JobExecutionException {
        Job exec = XmlRpcStructFactory.getJobFromXmlRpc(jobHash);
        JobInput in = GenericResourceManagerObjectFactory
                .getJobInputFromClassName(exec.getJobInputClassName());
        in.read(jobIn);

        JobSpec spec = new JobSpec(in, exec);

        URL remoteUrl = safeGetUrlFromString(urlStr);
        ResourceNode remoteNode = null;
View Full Code Here

    private String genericHandleJob(Hashtable jobHash, Object jobIn)
            throws SchedulerException {

        Job exec = XmlRpcStructFactory.getJobFromXmlRpc(jobHash);
        JobInput in = GenericResourceManagerObjectFactory
                .getJobInputFromClassName(exec.getJobInputClassName());
        in.read(jobIn);

        JobSpec spec = new JobSpec(in, exec);

        // queue the job up
        String jobId = null;
View Full Code Here

    }

    private boolean genericHandleJob(Hashtable jobHash, Object jobIn,
            String urlStr) throws JobExecutionException {
        Job exec = XmlRpcStructFactory.getJobFromXmlRpc(jobHash);
        JobInput in = GenericResourceManagerObjectFactory
                .getJobInputFromClassName(exec.getJobInputClassName());
        in.read(jobIn);

        JobSpec spec = new JobSpec(in, exec);

        URL remoteUrl = safeGetUrlFromString(urlStr);
        ResourceNode remoteNode = null;
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.resource.structs.JobInput

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.