Commit 056afb0c authored by Joao Pedro Lopes's avatar Joao Pedro Lopes
Browse files

FTS-1704: Add --buffer-size parameter to FTS-REST clients and Python bindings

parent e2b2808f
......@@ -55,6 +55,7 @@ Note that _all_ parameters are optional.
* **sid** Specific id given by the user to be used with the deterministic job id generator algorithm
* **max_time_in_queue** Max time the job can be on the queue. Accepts an integer without suffix (interpreted as hours), or with a suffix s (seconds), m (minutes) or h (hours). e.g `60s`
* **priority** Job priority. It should be a number between 1 and 5. The higher the number, the higher the priority.
* **buffer_size** TCP buffer size (in bytes) that will be used for the given transfer job
### Returns:
A dictionary representing a new job submission
......
......@@ -50,7 +50,8 @@ DEFAULT_PARAMS = {
's3alternate': False,
'target_qos': None,
'ipv4': False,
'ipv6': False
'ipv6': False,
'buffer_size': None
}
def _metadata(data):
......@@ -169,6 +170,8 @@ class JobSubmitter(Base):
help='use S3 alternate URL')
self.opt_parser.add_option('--target-qos', dest='target_qos', type='string',
help='define the target QoS for this transfer for CDMI endpoints')
self.opt_parser.add_option('--buffer-size', '--buff-size', dest='buffer_size', type=int,
help="TCP buffer size (expressed in bytes) that will be used for the given transfer job")
def validate(self):
self.checksum = None
......@@ -260,7 +263,8 @@ class JobSubmitter(Base):
ipv4=self.options.ipv4,
ipv6=self.options.ipv6,
s3alternate=self.options.s3alternate,
target_qos=self.options.target_qos
target_qos=self.options.target_qos,
buffer_size=self.options.buffer_size
)
def _do_submit(self, context):
......
......@@ -108,7 +108,8 @@ def new_job(transfers=None, deletion=None, verify_checksum=False, reuse=None, ov
bring_online=None, archive_timeout=None, copy_pin_lifetime=None,
retry=-1, retry_delay=0, metadata=None, priority=None, strict_copy=False,
max_time_in_queue=None, timeout=None,
id_generator=JobIdGenerator.standard, sid=None, s3alternate=False, nostreams=1):
id_generator=JobIdGenerator.standard, sid=None,
s3alternate=False, nostreams=1, buffer_size=None):
"""
Creates a new dictionary representing a job
......@@ -132,6 +133,7 @@ def new_job(transfers=None, deletion=None, verify_checksum=False, reuse=None, ov
sid: Specific id given by the client
s3alternate: Use S3 alternate url schema
nostreams: Number of streams
buffer_size: Tcp buffer size (in bytes) that will be used for the given transfer-job
Returns:
An initialized dictionary representing a job
......@@ -164,7 +166,8 @@ def new_job(transfers=None, deletion=None, verify_checksum=False, reuse=None, ov
id_generator=id_generator,
sid=sid,
s3alternate=s3alternate,
nostreams=nostreams
nostreams=nostreams,
buffer_size=buffer_size
)
job = dict(
files=transfers,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment