SPut
org.srb.SPut

SPut is a Kepler Actor which has a functionality similar to the SRB command namely "Sput". Sput imports one or more local files and/or directories into SRB space. SPut actor uploads a local file to the SRB. The following actor expects as input a reference to the SRB file system. This reference connection is obtained via the SRBConnect Actor in Kepler. See SRBConnect & its documentation.

The file reference system is created with a unique SRB user account and with this connection reference as input the SPut actor is able to gain access to the SRB file space. Once an alive SRB file connection system has been established the actor gets the remode SRB directory specified and a remote file path is created. The local file(s) is then copied to the SRB space with the established file path. If the SRB file path is not specified, upload to the current working directory. In case the above parallel put process fails , a streaming put process is carried out with SRBRandomAccess streams where the file is uploaded as a sequence of byte arrays instead.

The user is also asked for confirmation on overwriting existing SRB remote files if they exist or simply appending them.

Actor Input: Accepts a reference to the SRB files system, an SRB remote location and an aray of local file paths.

Actor Output: Outputs the remote file paths and an exit status.The exit status gives a message of "success" or appropriate error to indicate the status of file put process.

The following actor accesses SRB file reference system and SRB file space with the SRB Jargon API provided. The JARGON is a pure API for developing programs with a data grid interface and I/O for SRB file systems. Further information on SRB

Author(s): Efrat Jaeger
Version:$Id: SPut.java,v 1.16 2006/05/01 17:50:55 mangal Exp $


SRBFileSystem
SRB file system reference.

uploadedFiles
Paths to the remote location.

filesToPut
Paths to the files to upload

exitCode
Exit status of the operation



remoteDir
Where to upload the files.

confirmOverwrite
Overwrite existing srb file