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

Examples of org.apache.oodt.cas.resource.structs.exceptions.JobExecutionException


            throws JobExecutionException {

        XmlRpcBatchMgrProxy proxy = new XmlRpcBatchMgrProxy(jobSpec, resNode,
                this);
        if (!proxy.nodeAlive()) {
            throw new JobExecutionException("Node: [" + resNode.getNodeId()
                    + "] is down: Unable to execute job!");
        }

        synchronized (this.specToProxyMap) {
            specToProxyMap.put(jobSpec.getJob().getId(), proxy);
View Full Code Here


        // -------------------------------------------------------------

        File jobFile = new File(jobFname);
        if (!jobFile.exists()) {
            // file doesn't exist
            throw new JobExecutionException("RunDirJobSubmitter: input file "
                    + jobFname + " does not exist.");
        } else if (!jobFile.isFile()) {
            // file is a directory
            throw new JobExecutionException("RunDirJobSubmitter: input file "
                    + jobFname + " is not a file.");
        }

        File f = new File(inputFname);
        if (!f.exists()) {
            // file doesn't exist
            throw new JobExecutionException("RunDirJobSubmitter: input file "
                    + inputFname + " does not exist.");
        } else if (!f.isFile()) {
            // file is a directory
            throw new JobExecutionException("RunDirJobSubmitter: input file "
                    + inputFname + " is not a file.");
        }

        // ----------------------------------------------------------------
        // create a default JobSpec
        // ----------------------------------------------------------------
        JobSpec spec = JobBuilder.buildJobSpec(jobFile.getAbsolutePath());
        Job job = spec.getJob();
        NameValueJobInput jobInput = (NameValueJobInput) spec.getIn();

        // ----------------------------------------------------------------
        // open the file to read. traverse through the list of directories
        // name given & override the default Job's runDirName value with the
        // directory name. then submit the Job.
        // ----------------------------------------------------------------

        try {
            BufferedReader in = new BufferedReader(new FileReader(inputFname));
            if (!in.ready())
                throw new IOException();

            String line = null;
            String jobId = null;
            while ((line = in.readLine()) != null) {

                // overwrite the runDirName
                jobInput.setNameValuePair("runDirName", line);

                jobId = submitJob(job, jobInput);
                LOG.log(Level.INFO, "Job Submitted: id: [" + jobId + "]");
            }

            in.close();
        } catch (IOException e) {
            throw new JobExecutionException("RunDirJobSubmitter: " + e);
        }

    }
View Full Code Here

        String jobId = null;

        try {
            jobId = (String) client.execute("resourcemgr.handleJob", argList);
        } catch (XmlRpcException e) {
            throw new JobExecutionException(e.getMessage());
        } catch (IOException e) {
            throw new JobExecutionException(e.getMessage());
        }

        return jobId;

    }
View Full Code Here

        try {
            success = ((Boolean) client.execute("resourcemgr.handleJob",
                    argList)).booleanValue();
        } catch (XmlRpcException e) {
            throw new JobExecutionException(e.getMessage());
        } catch (IOException e) {
            throw new JobExecutionException(e.getMessage());
        }

        return success;

    }
View Full Code Here

        String jobId = null;

        try {
            jobId = (String) client.execute("resourcemgr.handleJob", argList);
        } catch (XmlRpcException e) {
            throw new JobExecutionException(e.getMessage(), e);
        } catch (IOException e) {
            throw new JobExecutionException(e.getMessage(), e);
        }

        return jobId;

    }
View Full Code Here

        try {
            success = ((Boolean) client.execute("resourcemgr.handleJob",
                    argList)).booleanValue();
        } catch (XmlRpcException e) {
            throw new JobExecutionException(e.getMessage(), e);
        } catch (IOException e) {
            throw new JobExecutionException(e.getMessage(), e);
        }

        return success;

    }
View Full Code Here

            throws JobExecutionException {

        XmlRpcBatchMgrProxy proxy = new XmlRpcBatchMgrProxy(jobSpec, resNode,
                this);
        if (!proxy.nodeAlive()) {
            throw new JobExecutionException("Node: [" + resNode.getNodeId()
                    + "] is down: Unable to execute job!");
        }

        synchronized (this.specToProxyMap) {
            specToProxyMap.put(jobSpec.getJob().getId(), proxy);
View Full Code Here

        String jobId = null;

        try {
            jobId = (String) client.execute("resourcemgr.handleJob", argList);
        } catch (XmlRpcException e) {
            throw new JobExecutionException(e.getMessage(), e);
        } catch (IOException e) {
            throw new JobExecutionException(e.getMessage(), e);
        }

        return jobId;

    }
View Full Code Here

        try {
            success = ((Boolean) client.execute("resourcemgr.handleJob",
                    argList)).booleanValue();
        } catch (XmlRpcException e) {
            throw new JobExecutionException(e.getMessage(), e);
        } catch (IOException e) {
            throw new JobExecutionException(e.getMessage(), e);
        }

        return success;

    }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.resource.structs.exceptions.JobExecutionException

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.