Skip to content

Commit 1e01110

Browse files
rename {native/symphony/...}_worker_adapter to worker_manager_{native/symphony/...}
1 parent 7b6d142 commit 1e01110

25 files changed

+109
-105
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ The following table maps each Scaler command to its corresponding section name i
233233
| `scaler_object_storage_server` | `[object_storage_server]` |
234234
| `scaler_ui` | `[webui]` |
235235
| `scaler_top` | `[top]` |
236-
| `scaler_worker_adapter_native` | `[native_worker_adapter]` |
237-
| `scaler_worker_adapter_symphony` | `[symphony_worker_adapter]`|
236+
| `scaler_worker_manager_native` | `[worker_manager_native]` |
237+
| `scaler_worker_manager_symphony` | `[worker_manager_symphony]`|
238238

239239
### Practical Scenarios & Examples
240240

@@ -363,7 +363,7 @@ might be added in the future.
363363
A Scaler scheduler can interface with IBM Spectrum Symphony to provide distributed computing across Symphony clusters.
364364
365365
```bash
366-
$ scaler_worker_adapter_symphony tcp://127.0.0.1:2345 --service-name ScalerService --base-concurrency 4 --host 127.0.0.1 --port 8080
366+
$ scaler_worker_manager_symphony tcp://127.0.0.1:2345 --service-name ScalerService --base-concurrency 4 --host 127.0.0.1 --port 8080
367367
```
368368
369369
This will start a Scaler worker that connects to the Scaler scheduler at `tcp://127.0.0.1:2345` and uses the Symphony
@@ -448,31 +448,31 @@ where `deepest_nesting_level` is the deepest nesting level a task has in your wo
448448
workload that has
449449
a base task that calls a nested task that calls another nested task, then the deepest nesting level is 2.
450450
451-
## Worker Adapter usage
451+
## Worker Manager usage
452452
453453
> **Note**: This feature is experimental and may change in future releases.
454454
455-
Scaler provides a Worker Adapter webhook interface to integrate with other job schedulers or resource managers. The
456-
Worker Adapter allows external systems to request the creation and termination of Scaler workers dynamically.
455+
Scaler provides a Worker Manager webhook interface to integrate with other job schedulers or resource managers. The
456+
Worker Manager allows external systems to request the creation and termination of Scaler workers dynamically.
457457
458-
Please check the OpenGRIS standard for more details on the Worker Adapter
458+
Please check the OpenGRIS standard for more details on the Worker Manager
459459
specification [here](https://github.com/finos/opengris).
460460
461-
### Starting the Native Worker Adapter
461+
### Starting the Native Worker Manager
462462
463-
Starting a Native Worker Adapter server at `http://127.0.0.1:8080`:
463+
Starting a Native Worker Manager server at `http://127.0.0.1:8080`:
464464
465465
```bash
466-
$ scaler_worker_adapter_native tcp://127.0.0.1:2345 --host 127.0.0.1 --port 8080
466+
$ scaler_worker_manager_native tcp://127.0.0.1:2345 --host 127.0.0.1 --port 8080
467467
```
468468
469-
Pass the `--adapter-webhook-url` argument to the Scaler scheduler to connect to the Worker Adapter:
469+
Pass the `--manager-webhook-url` argument to the Scaler scheduler to connect to the Worker Manager:
470470
471471
```bash
472-
$ scaler_scheduler tcp://127.0.0.1:2345 --adapter-webhook-url http://127.0.0.1:8080
472+
$ scaler_scheduler tcp://127.0.0.1:2345 --manager-webhook-url http://127.0.0.1:8080
473473
````
474474
475-
To check that the Worker Adapter is working, you can bring up `scaler_top` to see workers spawning and terminating as
475+
To check that the Worker Manager is working, you can bring up `scaler_top` to see workers spawning and terminating as
476476
there is task load changes.
477477
478478
## Performance

docs/source/tutorials/configuration.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ The following table maps each Scaler command to its corresponding section name i
179179
- ``[webui]``
180180
* - ``scaler_top``
181181
- ``[top]``
182-
* - ``scaler_worker_adapter_native``
183-
- ``[native_worker_adapter]``
184-
* - ``scaler_worker_adapter_symphony``
185-
- ``[symphony_worker_adapter]``
182+
* - ``scaler_worker_manager_native``
183+
- ``[worker_manager_native]``
184+
* - ``scaler_worker_manager_symphony``
185+
- ``[worker_manager_symphony]``
186186

187187

188188
Practical Scenarios & Examples

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ scaler_cluster = "scaler.entry_points.cluster:main"
7272
scaler_top = "scaler.entry_points.top:main"
7373
scaler_ui = "scaler.entry_points.webui:main"
7474
scaler_object_storage_server = "scaler.entry_points.object_storage_server:main"
75-
scaler_worker_adapter_native = "scaler.entry_points.worker_adapter_native:main"
76-
scaler_worker_adapter_symphony = "scaler.entry_points.worker_adapter_symphony:main"
75+
scaler_worker_manager_native = "scaler.entry_points.worker_manager_native:main"
76+
scaler_worker_manager_symphony = "scaler.entry_points.worker_manager_symphony:main"
7777

7878
[tool.scikit-build]
7979
cmake.source-dir = "."

run_worker_adapter_native.py renamed to run_worker_manager_native.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from scaler.entry_points.worker_adapter_native import main
1+
from scaler.entry_points.worker_manager_native import main
22
from scaler.utility.debug import pdb_wrapped
33

44
if __name__ == "__main__":

run_worker_adapter_symphony.py renamed to run_worker_manager_symphony.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from scaler.entry_points.worker_adapter_symphony import main
1+
from scaler.entry_points.worker_manager_symphony import main
22
from scaler.utility.debug import pdb_wrapped
33

44
if __name__ == "__main__":

scaler/cluster/combo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def __init__(
110110
io_threads=scheduler_io_threads,
111111
max_number_of_tasks_waiting=max_number_of_tasks_waiting,
112112
client_timeout_seconds=client_timeout_seconds,
113-
adapter_webhook_url=None,
113+
manager_webhook_url=None,
114114
worker_timeout_seconds=worker_timeout_seconds,
115115
object_retention_seconds=object_retention_seconds,
116116
load_balance_seconds=load_balance_seconds,

scaler/cluster/scheduler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def __init__(
1919
address: ZMQConfig,
2020
storage_address: Optional[ObjectStorageConfig],
2121
monitor_address: Optional[ZMQConfig],
22-
adapter_webhook_url: Optional[str],
22+
manager_webhook_url: Optional[str],
2323
io_threads: int,
2424
max_number_of_tasks_waiting: int,
2525
client_timeout_seconds: int,
@@ -40,7 +40,7 @@ def __init__(
4040
scheduler_address=address,
4141
object_storage_address=storage_address,
4242
monitor_address=monitor_address,
43-
adapter_webhook_url=adapter_webhook_url,
43+
manager_webhook_url=manager_webhook_url,
4444
io_threads=io_threads,
4545
max_number_of_tasks_waiting=max_number_of_tasks_waiting,
4646
client_timeout_seconds=client_timeout_seconds,

scaler/config/section/scheduler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class SchedulerConfig:
1515
scheduler_address: ZMQConfig = dataclasses.field()
1616
object_storage_address: Optional[ObjectStorageConfig] = None
1717
monitor_address: Optional[ZMQConfig] = None
18-
adapter_webhook_url: Optional[str] = None
18+
manager_webhook_url: Optional[str] = None
1919
protected: bool = True
2020
allocate_policy: AllocatePolicy = AllocatePolicy.even
2121
event_loop: str = "builtin"
@@ -44,10 +44,10 @@ def __post_init__(self):
4444
raise ValueError("All timeout/retention/balance second values must be positive.")
4545
if self.load_balance_trigger_times <= 0:
4646
raise ValueError("load_balance_trigger_times must be a positive integer.")
47-
if self.adapter_webhook_url:
48-
parsed_url = urlparse(self.adapter_webhook_url)
47+
if self.manager_webhook_url:
48+
parsed_url = urlparse(self.manager_webhook_url)
4949
if not all([parsed_url.scheme, parsed_url.netloc]):
50-
raise ValueError(f"adapter_webhook_url '{self.adapter_webhook_url}' is not a valid URL.")
50+
raise ValueError(f"manager_webhook_url '{self.manager_webhook_url}' is not a valid URL.")
5151
valid_levels = {level.name for level in LoggingLevel}
5252
if self.logging_level.upper() not in valid_levels:
5353
raise ValueError(f"logging_level must be one of {valid_levels}, but got '{self.logging_level}'")

scaler/config/section/native_worker_adapter.py renamed to scaler/config/section/worker_manager_native.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99

1010

1111
@dataclasses.dataclass
12-
class NativeWorkerAdapterConfig:
12+
class WorkerManagerNativeConfig:
1313
scheduler_address: ZMQConfig
1414
storage_address: Optional[ObjectStorageConfig] = None
15-
adapter_web_host: str = "localhost"
16-
adapter_web_port: int = 8080
15+
manager_web_host: str = "localhost"
16+
manager_web_port: int = 8080
1717
per_worker_capabilities: WorkerCapabilities = dataclasses.field(
1818
default_factory=lambda: WorkerCapabilities.from_string("")
1919
)
@@ -32,10 +32,10 @@ class NativeWorkerAdapterConfig:
3232
logging_config_file: Optional[str] = None
3333

3434
def __post_init__(self):
35-
if not isinstance(self.adapter_web_host, str):
36-
raise TypeError(f"adapter_web_host should be string, given {self.adapter_web_host}")
37-
if not isinstance(self.adapter_web_port, int):
38-
raise TypeError(f"adapter_web_port must be between 1 and 65535, but got {self.adapter_web_port}")
35+
if not isinstance(self.manager_web_host, str):
36+
raise TypeError(f"manager_web_host should be string, given {self.manager_web_host}")
37+
if not isinstance(self.manager_web_port, int):
38+
raise TypeError(f"manager_web_port must be between 1 and 65535, but got {self.manager_web_port}")
3939
if self.io_threads <= 0:
4040
raise ValueError("io_threads must be a positive integer.")
4141
if self.worker_task_queue_size <= 0:

scaler/config/section/symphony_worker_adapter.py renamed to scaler/config/section/worker_manager_symphony.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
@dataclasses.dataclass
12-
class SymphonyWorkerConfig:
12+
class WorkerManagerSymphonyConfig:
1313
scheduler_address: ZMQConfig
1414
object_storage_address: Optional[ObjectStorageConfig]
1515
service_name: str

0 commit comments

Comments
 (0)