Package org.apache.airavata.schemas.gfac

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


    }

    public static boolean isEqual(HostDescription host1,HostDescription host2) {
        if ((host1.getType() instanceof GsisshHostType) && (host2.getType() instanceof GsisshHostType)) {
            GsisshHostType hostType1 = (GsisshHostType)host1.getType();
            GsisshHostType hostType2 = (GsisshHostType)host2.getType();
            if(hostType1.getHostAddress().equals(hostType2.getHostAddress())
                    && hostType1.getJobManager().equals(hostType2.getJobManager())
                    && (hostType1.getPort() == hostType2.getPort())
                    && hostType1.getMonitorMode().equals(hostType2.getMonitorMode())){
                return true;
            }
        } else {
            logger.error("This method is only impmlemented to handle Gsissh host types");
        }
View Full Code Here


    }

    public static boolean isEqual(HostDescription host1,HostDescription host2) {
        if ((host1.getType() instanceof GsisshHostType) && (host2.getType() instanceof GsisshHostType)) {
            GsisshHostType hostType1 = (GsisshHostType)host1.getType();
            GsisshHostType hostType2 = (GsisshHostType)host2.getType();
            if(hostType1.getHostAddress().equals(hostType2.getHostAddress())
                    && hostType1.getJobManager().equals(hostType2.getJobManager())
                    && (hostType1.getPort() == hostType2.getPort())
                    && hostType1.getMonitorMode().equals(hostType2.getMonitorMode())){
                return true;
            }
        } else {
            logger.error("This method is only impmlemented to handle Gsissh host types");
        }
View Full Code Here

            List<MonitorID> completedJobs = new ArrayList<MonitorID>();
            List<HostMonitorData> hostMonitorData = take.getHostMonitorData();
            for (HostMonitorData iHostMonitorData : hostMonitorData) {
                if (iHostMonitorData.getHost().getType() instanceof GsisshHostType) {
                    currentHostDescription = iHostMonitorData.getHost();
                    GsisshHostType gsisshHostType = (GsisshHostType) iHostMonitorData.getHost().getType();
                    String hostName = gsisshHostType.getHostAddress();
                    ResourceConnection connection = null;
                    if (connections.containsKey(hostName)) {
                        logger.debug("We already have this connection so not going to create one");
                        connection = connections.get(hostName);
                    } else {
View Full Code Here

    try {
      HostDescription hostDescriptor = getRegistry().getHostDescriptor(gsisshJobSubmissionProtocolResourceId);
      GSISSHJobSubmission d = new GSISSHJobSubmission();
      d.setJobSubmissionDataID(gsisshJobSubmissionProtocolResourceId);
      if (hostDescriptor.getType() instanceof GsisshHostType){
        GsisshHostType gsisshHostType = (GsisshHostType)hostDescriptor.getType();
        d.setInstalledPath(gsisshHostType.getInstalledPath());
        d.setMonitorMode(gsisshHostType.getMonitorMode());
        d.setPostJobCommands(Arrays.asList(gsisshHostType.getPostJobCommandsArray()));
        d.setPreJobCommands(Arrays.asList(gsisshHostType.getPreJobCommandsArray()));
        d.setSshPort(gsisshHostType.getPort());
        d.setResourceJobManager(getResourceJobManager(gsisshHostType.getJobManager()));
      } else {
        throw new Exception("Saved job protocol is not GSISSH");
      }
      return d;
    } catch (Exception e) {
View Full Code Here

      GSISSHJobSubmission jobSubmission) throws InvalidRequestException,
      AiravataClientException, AiravataSystemException, TException {
    try {
      HostDescription hostDescriptor = getRegistry().getHostDescriptor(computeResourceId);
      hostDescriptor.getType().changeType(GsisshHostType.type);
      GsisshHostType s = (GsisshHostType)hostDescriptor.getType();
      s.setInstalledPath(jobSubmission.getInstalledPath());
      ExportProperties exports = s.addNewExports();
      if (jobSubmission.getExportsSize()>0) {
        for (String export : jobSubmission.getExports()) {
          exports.addNewName().setValue(export);
        }
      }
      s.setExports(exports);
      s.setJobManager(jobSubmission.getResourceJobManager().toString());
      s.setMonitorMode(jobSubmission.getMonitorMode());
      s.setPort(22);
      if (jobSubmission.getPostJobCommandsSize()>0) {
        s.setPostJobCommandsArray(jobSubmission.getPostJobCommands()
            .toArray(new String[] {}));
      }
      if (jobSubmission.getPreJobCommandsSize()>0) {
        s.setPreJobCommandsArray(jobSubmission.getPreJobCommands()
            .toArray(new String[] {}));
      }
      getRegistry().updateHostDescriptor(hostDescriptor);
      return computeResourceId;
    } catch (Exception e) {
View Full Code Here

TOP

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

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.