Package org.apache.airavata.gfac.notification.events

Examples of org.apache.airavata.gfac.notification.events.GramJobIDEvent


                saveApplicationJob(jobExecutionContext, ApplicationJobStatus.UN_SUBMITTED);
                applicationSaved=true;
                String jobStatusMessage = "Un-submitted JobID= " + job.getIDAsString();
                log.info(jobStatusMessage);
                jobExecutionContext.getNotifier().publish(new GramJobIDEvent(jobStatusMessage));

                log.info("JobID = " + job.getIDAsString());


                log.info("Two phase commit: sending COMMIT_REQUEST signal; Job id - " + job.getIDAsString());

                try {
                    job.signal(GramJob.SIGNAL_COMMIT_REQUEST);

                } catch (GramException gramException) {
                    throw new GFacException("Error while sending commit request. Job Id - "
                            + job.getIDAsString(), gramException);
                } catch (GSSException gssException) {

                    // User credentials are invalid
                    log.error("Error while submitting commit request - Credentials provided are invalid. Job Id - "
                            + job.getIDAsString(), e);
                    log.info("Attempting to renew credentials and re-submit commit signal...");

                    renewCredentials(jobExecutionContext);

                    try {
                        job.signal(GramJob.SIGNAL_COMMIT_REQUEST);
                    } catch (GramException e1) {
                        throw new GFacException("Error while sending commit request. Job Id - "
                                + job.getIDAsString(), e1);
                    } catch (GSSException e1) {
                        throw new GFacException("Error while sending commit request. Job Id - "
                                + job.getIDAsString() + ". Credentials provided invalid", e1);
                    }
                }

                jobStatusMessage = "Submitted JobID= " + job.getIDAsString();
                log.info(jobStatusMessage);
                jobExecutionContext.getNotifier().publish(new GramJobIDEvent(jobStatusMessage));

            } catch (GSSException e) {
                // Renew credentials and re-submit
                reSubmitJob(gateKeeper, jobExecutionContext, globusHostType, e);

            } catch (GramException e) {
                throw new GFacException("An error occurred while submitting a job, job id = " + job.getIDAsString(), e);
            }
        } else {

            /*
            * The first boolean is to force communication through SSLv3
            * The second boolean is to specify the job is a batch job - use true for interactive and false for
             * batch.
            * The third boolean is to specify to use the full proxy and not delegate a limited proxy.
            */
            try {

                job.request(true, gateKeeper, false, false);
                renewCredentialsAttempt = false;

            } catch (GramException e) {
                throw new GFacException("An error occurred while submitting a job, job id = " + job.getIDAsString(), e);
            } catch (GSSException e) {

                // Renew credentials and re-submit
                reSubmitJob(gateKeeper, jobExecutionContext, globusHostType, e);
            }

            String jobStatusMessage = "Un-submitted JobID= " + job.getIDAsString();
            log.info(jobStatusMessage);
            jobExecutionContext.getNotifier().publish(new GramJobIDEvent(jobStatusMessage));

        }

        currentlyExecutingJobCache.put(job.getIDAsString(), job);
       
View Full Code Here


            checkJobStatus(jobExecutionContext, host, gateKeeper);
           
            String gramJobid = job.getIDAsString();
            String jobID = "JobID= " + gramJobid;
            log.info(jobID);
            jobExecutionContext.getNotifier().publish(new GramJobIDEvent(jobID));
          
            //WorkflowNodeGramData workflowNodeGramData = new WorkflowNodeGramData(experimentID, nodeID, job.getRSL(),hostName , job.getIDAsString());;
           
          // for provider test
        saveApplicationJob(jobExecutionContext);
View Full Code Here

TOP

Related Classes of org.apache.airavata.gfac.notification.events.GramJobIDEvent

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.