This is an automated email from the ASF dual-hosted git repository.
zaynt4606 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/celeborn.git
The following commit(s) were added to refs/heads/main by this push:
new b30fb5d6df [MINOR] Fix worker tags configuration examples
b30fb5d6df is described below
commit b30fb5d6dfffe5479f018bfd322adab8b2328b5f
Author: huangxiaoping <[email protected]>
AuthorDate: Tue Nov 17 15:29:47 2026 +0800
[MINOR] Fix worker tags configuration examples
### What changes were proposed in this pull request?
Fix the Worker Tags YAML and SQL examples to use complete worker IDs,
terminate the SQL statements, and use the same tag-expression preferences in
both examples.
### Why are the changes needed?
TagsManager matches each configured worker ID against
`WorkerInfo.toUniqueId`, which includes the host and four ports. The existing
`host:port` examples cannot match a registered worker. The SQL example also has
trailing commas instead of statement terminators.
### Does this PR resolve a correctness bug?
- [ ] Yes
### Does this PR introduce _any_ user-facing change?
- [x] Yes
The Worker Tags configuration examples are corrected.
### How was this patch tested?
- Parsed the YAML and executed the SQL against simplified in-memory SQLite
tables; checked that their tags and configuration values match.
- Checked the worker ID format and the example tag intersection against the
source.
- Ran `git diff --check`.
MySQL execution and a live Celeborn cluster were not tested.
Closes #3962 from huangxiaopingRD/fix-worker-tags-examples.
Authored-by: huangxiaoping <[email protected]>
Signed-off-by: zhengtao <[email protected]>
AI-Contributed/Feature: 0/35
AI-Contributed/UT: 0/0
---
docs/worker_tags.md | 35 +++++++++++++++++++----------------
1 file changed, 19 insertions(+), 16 deletions(-)
diff --git a/docs/worker_tags.md b/docs/worker_tags.md
index b2408c90d3..7d03eb73ee 100644
--- a/docs/worker_tags.md
+++ b/docs/worker_tags.md
@@ -93,6 +93,9 @@ This backend reads [worker tags and
configurations](#configuration) settings fro
user-specified dynamic config file. For more information on using the
FileSystem config store
backend, refer to [filesystem config
service](../developers/configuration#filesystem-config-service).
+Worker IDs use the format `host:rpcPort:pushPort:fetchPort:replicatePort`. Use
the host and
+ports reported by each registered worker.
+
Here is an example of worker tags assignment and configuration via YAML file:
```yaml
@@ -102,15 +105,15 @@ Here is an example of worker tags assignment and
configuration via YAML file:
celeborn.tags.tagsExpr: 'env=production'
tags:
env=production:
- - 'host1:1111'
- - 'host2:2222'
+ - 'host1:1111:1112:1113:1114'
+ - 'host2:2221:2222:2223:2224'
env=staging:
- - 'host3:3333'
+ - 'host3:3331:3332:3333:3334'
region=us-east:
- - 'host1:1111'
- - 'host3:3333'
+ - 'host1:1111:1112:1113:1114'
+ - 'host3:3331:3332:3333:3334'
region=us-west:
- - 'host2:2222'
+ - 'host2:2221:2222:2223:2224'
- tenantId: tenant_01
level: TENANT
config:
@@ -134,25 +137,25 @@ Here is an example SQL of worker tags assignment and
configuration:
# SYSTEM level configuration
INSERT INTO `celeborn_cluster_system_config` ( `id`, `cluster_id`,
`config_key`, `config_value`, `type`, `gmt_create`, `gmt_modify` )
VALUES
- ( 1, 1, 'celeborn.tags.preferClientTagsExpr', 'true', 'master',
'2024-02-27 22:08:30', '2024-02-27 22:08:30' ),
- ( 2, 1, 'celeborn.tags.tagsExpr', 'env=production', 'master', '2024-02-27
22:08:30', '2024-02-27 22:08:30' ),
+ ( 1, 1, 'celeborn.tags.preferClientTagsExpr', 'false', 'master',
'2024-02-27 22:08:30', '2024-02-27 22:08:30' ),
+ ( 2, 1, 'celeborn.tags.tagsExpr', 'env=production', 'master', '2024-02-27
22:08:30', '2024-02-27 22:08:30' );
# TENANT/TENANT_USER level configuration
INSERT INTO `celeborn_cluster_tenant_config` ( `id`, `cluster_id`,
`tenant_id`, `level`, `name`, `config_key`, `config_value`, `type`,
`gmt_create`, `gmt_modify` )
VALUES
- ( 1, 1, 'tenant_01', 'TENANT', '', 'celeborn.tags.preferClientTagsExpr',
'true', 'master', '2024-02-27 22:08:30', '2024-02-27 22:08:30' ),
+ ( 1, 1, 'tenant_01', 'TENANT', '', 'celeborn.tags.preferClientTagsExpr',
'false', 'master', '2024-02-27 22:08:30', '2024-02-27 22:08:30' ),
( 2, 1, 'tenant_01', 'TENANT', '', 'celeborn.tags.tagsExpr',
'env=production,region=us-east', 'master', '2024-02-27 22:08:30', '2024-02-27
22:08:30' ),
- ( 3, 1, 'tenant_01', 'TENANT_USER', 'Jerry',
'celeborn.tags.preferClientTagsExpr', 'true', 'master', '2024-02-27 22:08:30',
'2024-02-27 22:08:30' ),
+ ( 3, 1, 'tenant_01', 'TENANT_USER', 'Jerry',
'celeborn.tags.preferClientTagsExpr', 'true', 'master', '2024-02-27 22:08:30',
'2024-02-27 22:08:30' );
# Worker Tags Assignment
INSERT INTO `celeborn_cluster_tags` ( `id`, `cluster_id`, `tag`, `worker_id`,
`gmt_create`, `gmt_modify` )
VALUES
- ( 1, 1, 'env=production', 'host1:1111', '2023-08-26 22:08:30', '2023-08-26
22:08:30' ),
- ( 2, 1, 'env=production', 'host2:2222', '2023-08-26 22:08:30', '2023-08-26
22:08:30' ),
- ( 3, 1, 'env=staging', 'host3:3333', '2023-08-26 22:08:30', '2023-08-26
22:08:30' ),
- ( 4, 1, 'region=us-east', 'host1:1111', '2023-08-26 22:08:30', '2023-08-26
22:08:30' ),
- ( 5, 1, 'region=us-east', 'host3:3333', '2023-08-26 22:08:30', '2023-08-26
22:08:30' ),
- ( 6, 1, 'region=us-west', 'host2:2222', '2023-08-26 22:08:30', '2023-08-26
22:08:30' ),
+ ( 1, 1, 'env=production', 'host1:1111:1112:1113:1114', '2023-08-26
22:08:30', '2023-08-26 22:08:30' ),
+ ( 2, 1, 'env=production', 'host2:2221:2222:2223:2224', '2023-08-26
22:08:30', '2023-08-26 22:08:30' ),
+ ( 3, 1, 'env=staging', 'host3:3331:3332:3333:3334', '2023-08-26
22:08:30', '2023-08-26 22:08:30' ),
+ ( 4, 1, 'region=us-east', 'host1:1111:1112:1113:1114', '2023-08-26
22:08:30', '2023-08-26 22:08:30' ),
+ ( 5, 1, 'region=us-east', 'host3:3331:3332:3333:3334', '2023-08-26
22:08:30', '2023-08-26 22:08:30' ),
+ ( 6, 1, 'region=us-west', 'host2:2221:2222:2223:2224', '2023-08-26
22:08:30', '2023-08-26 22:08:30' );
```
## FAQ