
SGet |
org.srb.SGet |
SGet is a Kepler Actor which has a functionality similar to the SRB command
namely "Sget". Sget exports one or more objects from SRB space into the local file system.
SGet actor downloads an SRB file to the local drive.
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 SGet actor is able to gain access to various files on the SRB file systems.
Once an alive SRB file connection system has been established the actor gets the local directory
and the files to establish the SRB file path. If the SRB directory doesn't exist, a new directory
is created. Once the SRB files path are determined, the files are copied from the SRB file space to the
local drive.In case the above process of parallel copy fails, a streaming copy process is carried out
with SRBRandomAccess streams where the file is downloaded as a sequence of byte arrays.
The user is also asked for confirmation on overwriting existing local files if they exist or simply
appending them.
Actor Input: Accepts a reference to the
SRB files system, a local directory and an aray of SRB remote file paths.
Actor Output: Outputs the local file paths and an exit status. The exit status gives
a message of "success" or appropriate error to indicate the status of file get 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: SGet.java,v 1.17 2006/05/01 17:50:55 mangal Exp $
SRBFileSystem
SRB file system reference.
filesToGet
Paths to the SRB files to fetch
fetchedFiles
Paths to the local location.
exitCode
Exit status of the operation.
localDir
Where to fetch the files on the local drive.
localDirParameter
Where to fetch the files on the local drive.
confirmOverwrite
Overwrite when SRB file is copied to loalFile
append
Append when SRB file is copied to loalFile