3. XRootD.client.CopyProcess
: Copying files¶
3.1. Class Reference¶
-
class
XRootD.client.
CopyProcess
[source]¶ Add multiple individually-configurable copy jobs to a “copy process” and run them in parallel (yes, in parallel, because
xrootd
isn’t limited by the GIL.
3.1.1. Methods¶
-
CopyProcess.
add_job
(source, target, sourcelimit=1, force=False, posc=False, coerce=False, mkdir=False, thirdparty='none', checksummode='none', checksumtype='', checksumpreset='', dynamicsource=False, chunksize=8388608, parallelchunks=4, inittimeout=600, tpctimeout=1800, rmBadCksum=False)[source]¶ Add a job to the copy process.
Parameters: - source (string) – original source URL
- target (string) – target directory or file
- sourcelimit (integer) – max number of download sources
- force (boolean) – overwrite target if it exists
- posc (boolean) – persist on successful close
- coerce (boolean) – ignore file usage rules, i.e. apply FORCE flag to
open()
- mkdir (boolean) – create the parent directories when creating a file
- thirdparty (string) – third party copy mode
- checksummode (string) – checksum mode to be used
- checksumtype (string) – type of the checksum to be computed
- checksumpreset (string) – pre-set checksum instead of computing it
- dynamicsource (boolean) – read as much data from source as is available without checking the size
- chunksize (integer) – chunk size for remote transfers
- parallelchunks (integer) – number of chunks that should be requested in parallel
- inittimeout (integer) – copy initialization timeout
- tpctimeout (integer) – timeout for a third-party copy to finish
- rmBadCksum (boolean) – remove target file on bad checksum
-
CopyProcess.
run
(handler=None)[source]¶ Run the copy jobs with an optional progress handler.
Parameters: handler – a copy progress handler. You can subclass XRootD.client.utils.CopyProgressHandler
and implement the three methods (begin()
,progress()
andend()
) to get regular progress updates for your copy jobs.