Examples of GridFtp


Examples of org.ogce.gfac.external.GridFtp

      notifier.computationFinished(compObj);     

      /*
       * Stdout and Stderror
       */
      GridFtp ftp = new GridFtp();

      // get Hostname
      String hostgridFTP = null;

      if (invocationContext.getExecutionContext().getExecutionModel().getHostDesc().getHostConfiguration().getGridFTPArray() != null && invocationContext.getExecutionContext().getExecutionModel().getHostDesc().getHostConfiguration().getGridFTPArray().length > 0) {
        hostgridFTP = invocationContext.getExecutionContext().getExecutionModel().getHostDesc().getHostConfiguration().getGridFTPArray(0).getEndPointReference();
      } else {
        hostgridFTP = invocationContext.getExecutionContext().getExecutionModel().getHost();
      }     

      URI stdoutURI = GfacUtils.createGsiftpURI(hostgridFTP, invocationContext.getExecutionContext().getExecutionModel().getStdOut());
      URI stderrURI = GfacUtils.createGsiftpURI(hostgridFTP, invocationContext.getExecutionContext().getExecutionModel().getStderr());
     
      System.out.println(stdoutURI);
      System.out.println(stderrURI);
     
      File logDir = new File("./service_logs");
      if (!logDir.exists()) {
        logDir.mkdir();
      }

      // Get the Stdouts and StdErrs
      QName x = QName.valueOf(invocationContext.getServiceName());
      String timeStampedServiceName = GfacUtils.createServiceDirName(x);
      File localStdOutFile = new File(logDir, timeStampedServiceName + ".stdout");
      File localStdErrFile = new File(logDir, timeStampedServiceName + ".stderr");
     
      String stdout = ftp.readRemoteFile(stdoutURI, gssCred, localStdOutFile);
      String stderr = ftp.readRemoteFile(stderrURI, gssCred, localStdErrFile);
     
      //set to context
      OutputUtils.fillOutputFromStdout(invocationContext.getMessageContext("output"), stdout, stderr);
     
     
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.