Package org.apache.airavata.schemas.gfac

Examples of org.apache.airavata.schemas.gfac.HostDescriptionType


        hostId = this.hostIdTextField.getText();
        String hostAddress = this.hostAddressTextField.getText();

        setHostId(hostId);
        setHostLocation(hostAddress);
        HostDescriptionType host = getHostDescription().getType();
        if(host instanceof GlobusHostType) {
          ((GlobusHostType)hostDescription.getType()).addGlobusGateKeeperEndPoint(this.gateKeeperTextField.getText());
            ((GlobusHostType)hostDescription.getType()).addGridFTPEndPoint(this.gridFTPTextField.getText());
        }else if (host instanceof UnicoreHostType){
          ((UnicoreHostType)hostDescription.getType()).addUnicoreBESEndPoint(this.gateKeeperTextField.getText());
View Full Code Here


        globusPanel.add(gridFTPTextField);
        SwingUtil.layoutToGrid(globusPanel.getSwingComponent(), 2, 2, SwingUtil.WEIGHT_NONE, 1);
        return globusPanel;
  }
    private void loadData() {
      HostDescriptionType t = getOriginalHostDescription().getType();
      hostIdTextField.setText(t.getHostName());
    hostAddressTextField.setText(t.getHostAddress());
    if (t instanceof GlobusHostType){
      cmbResourceProtocol.setSelectedItem(REMOTE_PROTOCOL_STR_GLOBUS);
      gateKeeperTextField.setText(StringUtil.createDelimiteredString(((GlobusHostType) t).getGlobusGateKeeperEndPointArray()));
      gridFTPTextField.setText(StringUtil.createDelimiteredString(((GlobusHostType) t).getGridFTPEndPointArray()));
    }else if (t instanceof SSHHostType){
View Full Code Here

        hostId = this.hostIdTextField.getText();
        String hostAddress = this.hostAddressTextField.getText();

        setHostId(hostId);
        setHostLocation(hostAddress);
        HostDescriptionType host = getHostDescription().getType();
        if(host instanceof GlobusHostType) {
          ((GlobusHostType)hostDescription.getType()).addGlobusGateKeeperEndPoint(this.gateKeeperTextField.getText());
            ((GlobusHostType)hostDescription.getType()).addGridFTPEndPoint(this.gridFTPTextField.getText());
        }else if (host instanceof UnicoreHostType){
          ((UnicoreHostType)hostDescription.getType()).addUnicoreBESEndPoint(this.gateKeeperTextField.getText());
View Full Code Here

      }
    }
    return result;
  }
    private void loadData() {
      HostDescriptionType t = getOriginalHostDescription().getType();
      hostIdTextField.setText(t.getHostName());
    hostAddressTextField.setText(t.getHostAddress());
    if (t instanceof GlobusHostType){
      cmbResourceProtocol.setSelectedItem(REMOTE_PROTOCOL_STR_GLOBUS);
      gateKeeperTextField.setText(arrayToString(((GlobusHostType) t).getGlobusGateKeeperEndPointArray()));
      gridFTPTextField.setText(arrayToString(((GlobusHostType) t).getGridFTPEndPointArray()));
    }else if (t instanceof SSHHostType){
View Full Code Here

    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
        log.info("Invoking GridFTPOutputHandler ...");

       ApplicationDeploymentDescriptionType app = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription().getType();

      HostDescriptionType hostType = jobExecutionContext.getApplicationContext().getHostDescription().getType();
      String[] gridFTPEndpointArray = null;
      String hostName = null;
       if(jobExecutionContext.getApplicationContext().getHostDescription().getType() instanceof GlobusHostType){
          gridFTPEndpointArray = ((GlobusHostType) hostType).getGridFTPEndPointArray();
View Full Code Here

    }

    private static void stageOutputFiles(JobExecutionContext jobExecutionContext, String outputFileStagingPath) throws GFacProviderException,GFacException {


         HostDescriptionType hostType = jobExecutionContext.getApplicationContext().getHostDescription().getType();
         String[] gridFTPEndpointArray = null;

           if(jobExecutionContext.getApplicationContext().getHostDescription().getType() instanceof GlobusHostType){
             gridFTPEndpointArray = ((GlobusHostType) hostType).getGridFTPEndPointArray();
           }
View Full Code Here

    public void execute(JobExecutionContext jobExecutionContext) throws GFacProviderException, GFacException {
        log.info("Invoking GSISSH Provider Invoke ...");
        StringBuffer data = new StringBuffer();
        jobExecutionContext.getNotifier().publish(new StartExecutionEvent());
        HostDescriptionType host = jobExecutionContext.getApplicationContext().
                getHostDescription().getType();
        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) jobExecutionContext.getApplicationContext().
                getApplicationDeploymentDescription().getType();
        JobDetails jobDetails = new JobDetails();
        try {
            Cluster cluster = null;
            if (jobExecutionContext.getSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT) != null) {
                cluster = ((GSISecurityContext) jobExecutionContext.getSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT)).getPbsCluster();
            }
            if (cluster == null) {
                throw new GFacProviderException("Security context is not set properly");
            } else {
                log.info("Successfully retrieved the Security Context");
            }
            // This installed path is a mandetory field, because this could change based on the computing resource
            JobDescriptor jobDescriptor = GFACGSISSHUtils.createJobDescriptor(jobExecutionContext, app, cluster);

            log.info(jobDescriptor.toXML());
            data.append("jobDesc=").append(jobDescriptor.toXML());
            jobDetails.setJobDescription(jobDescriptor.toXML());

            String jobID = cluster.submitBatchJob(jobDescriptor);
            jobExecutionContext.setJobDetails(jobDetails);
            if (jobID == null) {
                jobDetails.setJobID("none");
                GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
            } else {
                jobDetails.setJobID(jobID);
                GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.SUBMITTED);
            }
            data.append(",jobId=").append(jobDetails.getJobID());

            // Now job has submitted to the resource, its up to the Provider to parse the information to daemon handler
            // to perform monitoring, daemon handlers can be accessed from anywhere
            delegateToMonitorHandlers(jobExecutionContext, (GsisshHostType) host, jobID);
            // we know this host is type GsiSSHHostType
        } catch (SSHApiException e) {
            String error = "Error submitting the job to host " + host.getHostAddress() + " message: " + e.getMessage();
            log.error(error);
            jobDetails.setJobID("none");
            GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
            GFacUtils.saveErrorDetails(jobExecutionContext, error, CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
            throw new GFacProviderException(error, e);
        } catch (Exception e) {
            String error = "Error submitting the job to host " + host.getHostAddress() + " message: " + e.getMessage();
            log.error(error);
            jobDetails.setJobID("none");
            GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.FAILED);
            GFacUtils.saveErrorDetails(jobExecutionContext, error, CorrectiveAction.CONTACT_SUPPORT, ErrorCategory.AIRAVATA_INTERNAL_ERROR);
            throw new GFacProviderException(error, e);
View Full Code Here

    }

    public void recover(JobExecutionContext jobExecutionContext) throws GFacProviderException,GFacException {
        // have to implement the logic to recover a gfac failure
        log.info("Invoking Recovering for the Experiment: " + jobExecutionContext.getExperimentID());
        HostDescriptionType host = jobExecutionContext.getApplicationContext().
                getHostDescription().getType();
        String jobId = "";
        String jobDesc = "";
        try {
            String pluginData = GFacUtils.getPluginData(jobExecutionContext, this.getClass().getName());
View Full Code Here

public class LocalDirectorySetupHandler implements GFacHandler {
    private static final Logger log = LoggerFactory.getLogger(LocalDirectorySetupHandler.class);

    public void invoke(JobExecutionContext jobExecutionContext) throws GFacHandlerException {
        log.info("Invoking LocalDirectorySetupHandler ...");
        HostDescriptionType type = jobExecutionContext.getApplicationContext().getHostDescription().getType();
        ApplicationDescription applicationDeploymentDescription = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
        ApplicationDeploymentDescriptionType app = applicationDeploymentDescription.getType();
        log.debug("working directory = " + app.getStaticWorkingDirectory());
        log.debug("temp directory = " + app.getScratchWorkingDirectory());
View Full Code Here

      }
    }
    return result;
  }
    private void loadData() {
      HostDescriptionType t = getOriginalHostDescription().getType();
      hostIdTextField.setText(t.getHostName());
    hostAddressTextField.setText(t.getHostAddress());
    boolean isGlobus = t instanceof GlobusHostType;
    if (isGlobus){
      cmbResourceProtocol.setSelectedItem(REMOTE_PROTOCOL_STR_GLOBUS);
      globusGateKeeperTextField.setText(arrayToString(((GlobusHostType) t).getGlobusGateKeeperEndPointArray()));
      GridFTPTextField.setText(arrayToString(((GlobusHostType) t).getGridFTPEndPointArray()));
View Full Code Here

TOP

Related Classes of org.apache.airavata.schemas.gfac.HostDescriptionType

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.