aistore.sdk.multiobj.object_group
aistore.sdk.multiobj.object_group
Module Contents
Classes
API
Bases: AISSource
A class representing multiple objects within the same bucket. Only one of obj_names, obj_range, or obj_template should be provided.
Parameters:
Bucket the objects belong to
List of object names to include in this collection
Range defining which object names in the bucket should be included
String argument to pass as template value directly to api
The client bound to the bucket used by the ObjectGroup.
Parse job ID response that may contain comma-separated UUIDs. Used only for copy and archive operations which can return multiple UUIDs.
Parameters:
Raw response text
Returns: List[str]
List[str]: List of individual job IDs
Create or append to an archive
Parameters:
Name of archive to create or append
MIME type of the content
Destination bucket, defaults to current bucket
Include the source bucket name in the archived objects’ names
Allow appending to an existing archive
Whether to continue if there is an error archiving a single object
Returns: List[str]
List[str]: List of job IDs that can be used to check the status of the operation
Copies a list or range of objects in a bucket
Parameters:
Destination bucket
Value to prepend to the name of copied objects
Whether to continue if there is an error copying a single object
Skip performing the copy and just log the intended actions
Force this job to run over others in case it conflicts (see “limited coexistence” and xact/xreg/xreg.go)
GET the latest object version from the associated remote bucket
synchronize destination bucket with its remote (e.g., Cloud or remote AIS) source
Number of concurrent workers (readers). Defaults to the number of target mountpaths if omitted or zero. A value of -1 indicates no workers at all (i.e., single-threaded execution). Any positive value will be adjusted not to exceed the number of target CPUs.
Returns: List[str]
List[str]: List of job IDs that can be used to check the status of the operation
Raises:
aistore.sdk.errors.AISError: All other types of errors with AIStorerequests.ConnectionError: Connection errorrequests.ConnectionTimeout: Timed out connecting to AIStorerequests.exceptions.HTTPError: Service unavailablerequests.RequestException: “There was an ambiguous exception that occurred while handling…”requests.ReadTimeout: Timed out receiving response from AIStore
Deletes a list or range of objects in a bucket
Returns:
Job ID (as str) that can be used to check the status of the operation
Raises:
aistore.sdk.errors.AISError: All other types of errors with AIStorerequests.ConnectionError: Connection errorrequests.ConnectionTimeout: Timed out connecting to AIStorerequests.exceptions.HTTPError: Service unavailablerequests.RequestException: “There was an ambiguous exception that occurred while handling…”requests.ReadTimeout: Timed out receiving response from AIStore
Evicts a list or range of objects in a bucket so that they are no longer cached in AIS NOTE: only Cloud buckets can be evicted.
Returns:
Job ID (as str) that can be used to check the status of the operation
Raises:
aistore.sdk.errors.AISError: All other types of errors with AIStorerequests.ConnectionError: Connection errorrequests.ConnectionTimeout: Timed out connecting to AIStorerequests.exceptions.HTTPError: Service unavailablerequests.RequestException: “There was an ambiguous exception that occurred while handling…”requests.ReadTimeout: Timed out receiving response from AIStore
Implementation of the abstract method from AISSource that provides an iterator of all the objects in this bucket matching the specified prefix.
Parameters:
Limit objects selected by a given string prefix
By default, will include all object properties. Pass in None to skip and avoid the extra API call.
List all the object names included in this group of objects
Returns: List[str]
List of object names
Implementation of the abstract method from AISSource that provides an iterator of full URLs to every object in this bucket matching the specified prefix Args: prefix (str, optional): Limit objects selected by a given string prefix etl (Optional[ETLConfig], optional): An optional ETL configuration. If provided, the URLs will include ETL processing parameters. Defaults to None.
Prefetches a list or range of objects in a bucket so that they are cached in AIS NOTE: only Cloud buckets can be prefetched.
Parameters:
GET the latest object version from the associated remote bucket
Whether to continue if there is an error prefetching a single object
Utilize built-in blob-downloader for remote objects greater than the specified (threshold) size in bytes
Number of concurrent workers (readers). Defaults to the number of target mountpaths if omitted or zero. A value of -1 indicates no workers at all (i.e., single-threaded execution). Any positive value will be adjusted not to exceed the number of target CPUs.
Returns:
Job ID (as str) that can be used to check the status of the operation
Raises:
aistore.sdk.errors.AISError: All other types of errors with AIStorerequests.ConnectionError: Connection errorrequests.ConnectionTimeout: Timed out connecting to AIStorerequests.exceptions.HTTPError: Service unavailablerequests.RequestException: “There was an ambiguous exception that occurred while handling…”requests.ReadTimeout: Timed out receiving response from AIStore
Performs ETL operation on a list or range of objects in a bucket, placing the results in the destination bucket
Parameters:
Destination bucket
Name of existing ETL to apply
Timeout of the ETL job (e.g. 5m for 5 minutes)
Value to prepend to the name of resulting transformed objects
Dict mapping each extension to the extension that will replace it (i.e. {“jpg”: “txt”})
Whether to continue if there is an error transforming a single object
Skip performing the transform and just log the intended actions
Force this job to run over others in case it conflicts (see “limited coexistence” and xact/xreg/xreg.go)
GET the latest object version from the associated remote bucket
synchronize destination bucket with its remote (e.g., Cloud or remote AIS) source
Number of concurrent workers (readers). Defaults to the number of target mountpaths if omitted or zero. A value of -1 indicates no workers at all (i.e., single-threaded execution). Any positive value will be adjusted not to exceed the number of target CPUs.
List of ETL names to be used for the transformation pipeline.
Returns:
Job ID (as str) that can be used to check the status of the operation
Raises:
aistore.sdk.errors.AISError: All other types of errors with AIStorerequests.ConnectionError: Connection errorrequests.ConnectionTimeout: Timed out connecting to AIStorerequests.exceptions.HTTPError: Service unavailablerequests.RequestException: “There was an ambiguous exception that occurred while handling…”requests.ReadTimeout: Timed out receiving response from AIStore