Package org.apache.airavata.schemas.gfac

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


        //TODO: why it is tightly coupled with gridftp
//        GlobusHostType host = (GlobusHostType) jobExecutionContext.getApplicationContext().getHostDescription().getType();

        //TODO: make it more reusable
        HostDescriptionType hostType = jobExecutionContext.getApplicationContext().getHostDescription().getType();



        if(hostType instanceof GlobusHostType){
          gridFTPEndpointArray = ((GlobusHostType) hostType).getGridFTPEndPointArray();
        }
        else if (hostType instanceof UnicoreHostType){
          gridFTPEndpointArray = ((UnicoreHostType) hostType).getGridFTPEndPointArray();
        }
        else {
          //TODO
        }


        ApplicationDescription applicationDeploymentDescription = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
        ApplicationDeploymentDescriptionType app = applicationDeploymentDescription.getType();
        GridFtp ftp = new GridFtp();

        try {
            GSSCredential gssCred = ((GSISecurityContext)jobExecutionContext.getSecurityContext(GSISecurityContext.GSI_SECURITY_CONTEXT)).getGssCredentails();

            if (gridFTPEndpointArray == null || gridFTPEndpointArray.length == 0) {
              gridFTPEndpointArray = new String[]{hostType.getHostAddress()};
            }
            boolean success = false;
            GFacHandlerException pe = null;// = new ProviderException("");
            for (String endpoint : gridFTPEndpointArray) {
                try {
View Full Code Here


        //TODO: why it is tightly coupled with gridftp
//        GlobusHostType host = (GlobusHostType) jobExecutionContext.getApplicationContext().getHostDescription().getType();

        //TODO: make it more reusable
        HostDescriptionType hostType = jobExecutionContext.getApplicationContext().getHostDescription().getType();

        if(jobExecutionContext.getApplicationContext().getHostDescription().getType() instanceof GlobusHostType){
          gridFTPEndpointArray = ((GlobusHostType) hostType).getGridFTPEndPointArray();
        }
        else if (jobExecutionContext.getApplicationContext().getHostDescription().getType() instanceof UnicoreHostType){
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 GramDirectorySetupHandler ...");
        HostDescriptionType type = jobExecutionContext.getApplicationContext().getHostDescription().getType();
        ApplicationDescription applicationDeploymentDescription = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
        ApplicationDeploymentDescriptionType app = applicationDeploymentDescription.getType();
        log.debug("working diectroy = " + app.getStaticWorkingDirectory());
        log.debug("temp directory = " + app.getScratchWorkingDirectory());
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()).addUnicoreHostAddress(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

          if (deployDesc!=null){
            ApplicationDeploymentDescriptionType appType = deployDesc.getApplicationDescription().getType();
            if (appType.getApplicationName()==null){
              appType.addNewApplicationName();
              }
            HostDescriptionType hostType = deployDesc.getHostDescription().getType();
            appType.getApplicationName().setStringValue(hostType.getHostName()+"_application");
            getDeployments().put(hostType.getHostName(), deployDesc);
            updateDeploymentTable();
          }
        } catch (AiravataAPIInvocationException e1) {
          setError(e1.getLocalizedMessage());
          e1.printStackTrace();
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

                            ApplicationDeploymentDescriptionType app = context.getExecutionDescription().getApp()
                                    .getType();
                            srcFilePath = app.getOutputDataDirectory() + File.separator + srcFilePath;

                            HostDescriptionType hostDescription = context.getExecutionDescription().getHost().getType();
                            if (hostDescription instanceof GlobusHostType) {
                                gridFTPTransfer(context, uri, srcFilePath);
                            } else if (GfacUtils.isLocalHost(hostDescription.getHostAddress())) {
                                uploadFile(context, uri, srcFilePath);
                            }
                        }
                    }
                }
View Full Code Here

                            String destFilePath = file.getName();

                            ApplicationDeploymentDescriptionType app = context.getExecutionDescription().getApp().getType();
                            destFilePath = app.getInputDataDirectory() + File.separator + destFilePath;

                            HostDescriptionType hostDescription = context.getExecutionDescription().getHost().getType();
                            if (hostDescription instanceof GlobusHostType) {
                                uploadToGridFTPFromHttp(context, uri, destFilePath);
                            } else {
                                downloadFile(context, uri, destFilePath);
                            }
View Full Code Here

                            String destFilePath = file.getName();

                            ApplicationDeploymentDescriptionType app = context.getExecutionDescription().getApp().getType();
                            destFilePath = app.getInputDataDirectory() + File.separator + destFilePath;

                            HostDescriptionType hostDescription = context.getExecutionDescription().getHost().getType();
                            if (hostDescription instanceof GlobusHostType) {
                                gridFTPTransfer(context, uri, destFilePath);
                            } else if (GfacUtils.isLocalHost(hostDescription.getHostAddress())) {
                                downloadFile(context, uri, destFilePath);
                            }

                            /*
                             * Replace parameter
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.