Class GPUdbWorkerList

class gpudb_multihead_io.GPUdbWorkerList(gpudb, ip_regex=None, use_head_node_only=False)[source]

A list of worker URLs to use for multi-head ingest.

Automatically populates the GPUdbWorkerList object with the worker URLs for the GPUdb server to support multi-head ingest. (If the specified GPUdb instance has multi-head ingest disabled, the worker list will have the head node URL only and multi-head ingest will not be used.)

Note that in some cases, workers may be configured to use more than one IP address, not all of which may be accessible to the client; this constructor uses the first IP returned by the server for each worker.

Parameters

gpudb (gpudb.GPUdb) –

The gpudb.GPUdb client handle from which to obtain the worker URLs.

ip_regex (str) –

Optional IP regular expression to match for the worker URLs.

use_head_node_only (bool) –

Optional boolean flag indicating that only head node should be used (for whatever reason), instead of the workers utilizing the multi-head feature.

validate_ip_address(ip_address)[source]

Validates the input string as an IP address (accepts IPv4 only).

Parameters

ip_address String that needs to be validated.

Returns: true or false.

get_worker_urls()[source]

Returns a list of the URLs for the GPUdb workers.

is_multihead_enabled()[source]

Returns whether multi-head I/O is enabled at the server.

get_ip_regex()[source]

Returns the IP regex, if any, used to create the worker list.