aistore.sdk.etl.webserver.utils
Module Contents
Functions
API
Compose the final direct PUT URL by combining components from multiple URLs.
Scenarios:
- Pipeline stage: direct_put_url has no path → append object path.
- Offline transform: direct_put_url has a path → prepend host_target path (e.g. “/v1/etl/_object/<etl-name>/<etl-secret>/”) to validate request.
Returns: str: Complete direct PUT URL targeting the correct AIS node.
Parameters:
direct_put_url
Destination node’s direct PUT URL, possibly with path/query.
host_target
Base AIS target URL used for scheme and base path.
obj_path
Path of the object to PUT.
Parse ETL pipeline from header value with validation.
Parameters:
pipeline_header
Comma-separated pipeline URLs
Returns: str
Tuple of (first_url, remaining_pipeline_header)
Raises:
InvalidPipelineError: If pipeline header is malformed
Pickle and base64-encode a user-provided ETLServer subclass for transmission.
Parameters:
cls
A subclass of ETLServer to serialize.
encoding
The string encoding for the Base64 payload.
Returns: str
A Base64 string containing the pickled class.
Raises:
TypeError: Ifclsis not a subclass of ETLServer.