agave-jobs/jobs-core/src/main/java/org/iplantc/service/jobs/managers/launchers/AbstractJobLauncher.java
/**
     * Pushes the app assets which are currently on the staging server to the job
     * work directory on the execution system.
     *
     * @throws JobException when unable to complete the transfer
     */
Pushes the app assets which are currently on the staging server to the job
work directory on the execution system.

@throws JobException when unable to complete the transfer
Pushes the app assets which are currently on the staging server to the job work directory on the execution system . @throws JobException when unable to complete the transfer
protected void stageSofwareApplication() throws ClosedByInterruptException, JobException {
        TransferTask transferTask;
        try {
            if (getRemoteExecutionDataClient() == null) {
                setRemoteExecutionDataClient(getExecutionSystem().getRemoteDataClient(getJob().getInternalUsername()));
                getRemoteExecutionDataClient().authenticate();
            }
            log.debug("Staging " + getJob().getSoftwareName() + " app dependencies for job " + getJob().getUuid() +
                    " to agave://" + getJob().getSystem() + "/" + getJob().getWorkPath());
            getRemoteExecutionDataClient().mkdirs(getJob().getWorkPath(), getJob().getOwner());
            checkStopped();
            transferTask = createJobWorkDirectoryTransferTask();
            if (getJob().getRetries() <= 0) {
                getRemoteExecutionDataClient().put(getTempAppDir().getPath(),
                        Paths.get(getJob().getWorkPath()).getParent().toString(),
                        new RemoteTransferListener(transferTask));
            }
            else {
                getRemoteExecutionDataClient().syncToRemote(getTempAppDir().getPath(),
                        new File(getJob().getWorkPath()).getParent(),
                        new RemoteTransferListener(transferTask));
            }
        } catch (ClosedByInterruptException e) {
            throw e;
        } catch (IOException | RemoteDataException | RemoteCredentialException e) {
            throw new JobException("Unable to stage application dependencies to execution system " + getJob().getSystem(), e);
        } finally {
            try {
                if (getRemoteExecutionDataClient() != null) getRemoteExecutionDataClient().disconnect();
            } catch (Exception ignored) {
            }
        }
    }
protected void stageSofwareApplication ( ) throws ClosedByInterruptException , JobException { TransferTask transferTask ; try { if ( getRemoteExecutionDataClient ( ) == null ) { setRemoteExecutionDataClient ( getExecutionSystem ( ) . getRemoteDataClient ( getJob ( ) . getInternalUsername ( ) ) ) ; getRemoteExecutionDataClient ( ) . authenticate ( ) ; } log . debug ( "Staging " + getJob ( ) . getSoftwareName ( ) + " app dependencies for job " + getJob ( ) . getUuid ( ) + " to agave://" + getJob ( ) . getSystem ( ) + "/" + getJob ( ) . getWorkPath ( ) ) ; getRemoteExecutionDataClient ( ) . mkdirs ( getJob ( ) . getWorkPath ( ) , getJob ( ) . getOwner ( ) ) ; checkStopped ( ) ; transferTask = createJobWorkDirectoryTransferTask ( ) ; if ( getJob ( ) . getRetries ( ) <= 0 ) { getRemoteExecutionDataClient ( ) . put ( getTempAppDir ( ) . getPath ( ) , Paths . get ( getJob ( ) . getWorkPath ( ) ) . getParent ( ) . toString ( ) , new RemoteTransferListener ( transferTask ) ) ; } else { getRemoteExecutionDataClient ( ) . syncToRemote ( getTempAppDir ( ) . getPath ( ) , new File ( getJob ( ) . getWorkPath ( ) ) . getParent ( ) , new RemoteTransferListener ( transferTask ) ) ; } } catch ( ClosedByInterruptException e ) { throw e ; } catch ( IOException | RemoteDataException | RemoteCredentialException e ) { throw new JobException ( "Unable to stage application dependencies to execution system " + getJob ( ) . getSystem ( ) , e ) ; } finally { try { if ( getRemoteExecutionDataClient ( ) != null ) getRemoteExecutionDataClient ( ) . disconnect ( ) ; } catch ( Exception ignored ) { } } }
Pushes the app assets which are currently on the staging server to the job
 work directory on the execution system.
Pushes the app assets which are currently on the staging server to the job work directory on the execution system .
// first time around we copy everything // after that we try to save some time on retries by only copying the assets // that are missing or changed since the last attempt.