Content-type: text/html
Sput -i [-a] [-c container] [-D dataType] [-S resourceName] [-P pathName] [-R,--retry retry_count] [-k] [-K] TargetName
The second synopsis reads data from standard input and writes it as an object in SRB space.
The localFileName and|or localDirectory can be a path name in the local file hierarchy. The user should have at least 'read' access permission for them. These inputs can have wildcards.
The TargetName can be a path name in the collection hierarchy. The object creation is done in the current collection, if TargetName is just an object-name. If a relative or absolute collection is given in TargetName, then the object is stored in that collection. The user should have write access permission for the collection. '.' can be used as a TargetName to denote the current collection.
If TargetName is a collection, then Sput uses the names of the local files as SRB object names. The directory path of localFileName is not used in making the SRB object name.
If TargetName is an object-name (possibly with a collection path) and there are more than one local file to be copied, then the TargetName is appended to the front of the local file names to make SRB object names.
If given, the data type of the object is set to dataType. Otherwise, Sput uses the file extender (i.e. string after the last '.') to figure out the type. If it is unable to figure out the data type, the 'generic' data type is used. Most popular extenders in Unix and DOS will be supported. The data type discovery is done in MCAT and hence future extenders can be supported without any change in or compilation of the client code.
If given, the object is stored in resourceName. Otherwise the object is stored in the default resource given by DEFRESOURCE in the user environment file, located in ~/.srb/.MdasEnv
If given, the object is stored in pathName. Otherwise the object is stored in the default path for the resource stored in MCAT.
By default, Sput uses the serial I/O API to do the put. The -m option or setting the environment variable "srbParallel" to any value can be used to set the transfer mode to the "server initiated connection" parallel I/O mode. In this mode, the server is the active partner. The client listens passively on the control socket for instructions from the servers. Upon receiving the client's initial request, the server with the help of informations from the MCAT, plans the execution of the data upload. Typically it sends data transfer instructions to the server where the import resource is located. The resource server then subdivides the file to be imported into segments and spawns threads to handle the import of each segment in parallel. One advantage of this scheme is data transfer is always directly between the resource server and client with no intermediate server in between.
A drawback of this mode is the client could be sitting behind a firewall and a server outside the firewall may not be able to connect to this client control socket.
The -M option which sets the transfer mode to the "client initiated connection" parallel I/O mode, was designed to get around the client's firewall issue. This mode is very similar to the "server initiated" mode except for the initial handshakes. In this mode, the control socket is on the resource server and the client spawns multiple threads, each initiating connection to the server control socket. After the connections have been established, the data transfer mechanism is the same as the "server initiated" mode.
Comparing with the "server initiated" mode, the overhead of the "client initiated" mode is slightly higher because of the more complicated initial handshakes. But for large file transfer, the difference is practically nothing.
In addition, with the -M option set, the [-N numthreads] can be used to suggest to the server on the number of threads to use for the parallel transfer. If this option is not used, the server will decide the number of threads based on an internal algorithm.
The -b option is for bulk loading of a large number of small files. It behaves like the -r option except runs a lot faster. Bulk loading of files into container is not supported in this command. Instead, the Sbload command should be used.