You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "s0nskar (via GitHub)" <gi...@apache.org> on 2024/11/18 14:19:53 UTC
[PR] [CELEBORN-1618][CIP-11] Supporting tags via DB Config Service [celeborn]
s0nskar opened a new pull request, #2925:
URL: https://github.com/apache/celeborn/pull/2925
<!--
Thanks for sending a pull request! Here are some tips for you:
- Make sure the PR title start w/ a JIRA ticket, e.g. '[CELEBORN-XXXX] Your PR title ...'.
- Be sure to keep the PR description updated to reflect all changes.
- Please write your PR title to summarize what this PR proposes.
- If possible, provide a concise example to reproduce the issue for a faster review.
-->
### What changes were proposed in this pull request?
Adding support for worker tags in DBConfigService.
### Why are the changes needed?
https://cwiki.apache.org/confluence/display/CELEBORN/CIP-11+Supporting+Tags+in+Celeborn
### Does this PR introduce _any_ user-facing change?
NO
### How was this patch tested?
WIP
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-1618][CIP-11] Supporting tags via DB Config Service [celeborn]
Posted by "s0nskar (via GitHub)" <gi...@apache.org>.
s0nskar commented on code in PR #2925:
URL: https://github.com/apache/celeborn/pull/2925#discussion_r1850463593
##########
service/src/main/resources/sql/mysql/celeborn-0.5.0-mysql.sql:
##########
@@ -54,3 +54,15 @@ CREATE TABLE IF NOT EXISTS celeborn_cluster_tenant_config
PRIMARY KEY (id),
UNIQUE KEY `index_unique_tenant_config_key` (`cluster_id`, `tenant_id`, `name`, `config_key`)
);
+
+CREATE TABLE IF NOT EXISTS celeborn_cluster_tags
Review Comment:
Agreed, it will better to keep separate files by version. Tests are also using 0.5.0 file, IMO for tests we can just rename the file to 0.6.0 . WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-1618][CIP-11] Supporting tags via DB Config Service [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #2925:
URL: https://github.com/apache/celeborn/pull/2925#discussion_r1850177692
##########
service/src/main/resources/sql/mysql/celeborn-0.5.0-mysql.sql:
##########
@@ -54,3 +54,15 @@ CREATE TABLE IF NOT EXISTS celeborn_cluster_tenant_config
PRIMARY KEY (id),
UNIQUE KEY `index_unique_tenant_config_key` (`cluster_id`, `tenant_id`, `name`, `config_key`)
);
+
+CREATE TABLE IF NOT EXISTS celeborn_cluster_tags
Review Comment:
Do we need to create new sql shell for 0.6.0?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-1618][CIP-11] Supporting tags via DB Config Service [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #2925:
URL: https://github.com/apache/celeborn/pull/2925#discussion_r1850479171
##########
service/src/main/resources/sql/mysql/celeborn-0.5.0-mysql.sql:
##########
@@ -54,3 +54,15 @@ CREATE TABLE IF NOT EXISTS celeborn_cluster_tenant_config
PRIMARY KEY (id),
UNIQUE KEY `index_unique_tenant_config_key` (`cluster_id`, `tenant_id`, `name`, `config_key`)
);
+
+CREATE TABLE IF NOT EXISTS celeborn_cluster_tags
Review Comment:
@s0nskar, you'd better to create new sql file for 0.6.0 and keep the current sql file for 0.5.0. cc @RexXiong.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-1618][CIP-11] Supporting tags via DB Config Service [celeborn]
Posted by "s0nskar (via GitHub)" <gi...@apache.org>.
s0nskar commented on code in PR #2925:
URL: https://github.com/apache/celeborn/pull/2925#discussion_r1850463593
##########
service/src/main/resources/sql/mysql/celeborn-0.5.0-mysql.sql:
##########
@@ -54,3 +54,15 @@ CREATE TABLE IF NOT EXISTS celeborn_cluster_tenant_config
PRIMARY KEY (id),
UNIQUE KEY `index_unique_tenant_config_key` (`cluster_id`, `tenant_id`, `name`, `config_key`)
);
+
+CREATE TABLE IF NOT EXISTS celeborn_cluster_tags
Review Comment:
Agreed, it will better to keep separate files by version. Tests are also using 0.5.0 file, IMO for tests we can rename the file to 0.6.0 . WDYT?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-1618][CIP-11] Supporting tags via DB Config Service [celeborn]
Posted by "s0nskar (via GitHub)" <gi...@apache.org>.
s0nskar commented on code in PR #2925:
URL: https://github.com/apache/celeborn/pull/2925#discussion_r1850314402
##########
service/src/main/resources/sql/mysql/celeborn-0.5.0-mysql.sql:
##########
@@ -54,3 +54,15 @@ CREATE TABLE IF NOT EXISTS celeborn_cluster_tenant_config
PRIMARY KEY (id),
UNIQUE KEY `index_unique_tenant_config_key` (`cluster_id`, `tenant_id`, `name`, `config_key`)
);
+
+CREATE TABLE IF NOT EXISTS celeborn_cluster_tags
Review Comment:
Hi @SteNicholas, did not understand what do mean by "create new sql shell", is there any sql utility that we need to change? But as mentioned in the description, this will introduce a user facing change that they will have to create this new table for storing tags.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-1618][CIP-11] Supporting tags via DB Config Service [celeborn]
Posted by "s0nskar (via GitHub)" <gi...@apache.org>.
s0nskar commented on code in PR #2925:
URL: https://github.com/apache/celeborn/pull/2925#discussion_r1849992599
##########
service/src/main/java/org/apache/celeborn/server/common/service/config/SystemConfig.java:
##########
@@ -69,10 +57,26 @@ public void setConfigs(Map<String, String> configs) {
this.configs = configs;
}
+ public void setConfigs(List<ClusterSystemConfig> configs) {
+ Map<String, String> newConfigs = new HashMap<>();
+ for (ClusterSystemConfig c : configs) {
+ newConfigs.put(c.getConfigKey(), c.getConfigValue());
+ }
+ this.configs = newConfigs;
Review Comment:
Nice catch! Fixed it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-1618][CIP-11] Supporting tags via DB Config Service [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #2925:
URL: https://github.com/apache/celeborn/pull/2925#discussion_r1850178385
##########
service/src/main/java/org/apache/celeborn/server/common/service/config/DynamicConfig.java:
##########
@@ -42,7 +42,7 @@
*/
public abstract class DynamicConfig {
private static final Logger LOG = LoggerFactory.getLogger(DynamicConfig.class);
- protected Map<String, String> configs = new HashMap<>();
+ protected volatile Map<String, String> configs = new HashMap<>();
Review Comment:
Why not use ConcurrentHashMap?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-1618][CIP-11] Supporting tags via DB Config Service [celeborn]
Posted by "s0nskar (via GitHub)" <gi...@apache.org>.
s0nskar commented on PR #2925:
URL: https://github.com/apache/celeborn/pull/2925#issuecomment-2485013189
cc: @FMX
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-1618][CIP-11] Supporting tags via DB Config Service [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #2925:
URL: https://github.com/apache/celeborn/pull/2925#discussion_r1850479171
##########
service/src/main/resources/sql/mysql/celeborn-0.5.0-mysql.sql:
##########
@@ -54,3 +54,15 @@ CREATE TABLE IF NOT EXISTS celeborn_cluster_tenant_config
PRIMARY KEY (id),
UNIQUE KEY `index_unique_tenant_config_key` (`cluster_id`, `tenant_id`, `name`, `config_key`)
);
+
+CREATE TABLE IF NOT EXISTS celeborn_cluster_tags
Review Comment:
You'd better to create new sql file for 0.6.0 and keep the current sql file for 0.5.0.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-1618][CIP-11] Supporting tags via DB Config Service [celeborn]
Posted by "s0nskar (via GitHub)" <gi...@apache.org>.
s0nskar commented on code in PR #2925:
URL: https://github.com/apache/celeborn/pull/2925#discussion_r1851355194
##########
service/src/main/resources/sql/mysql/celeborn-0.5.0-mysql.sql:
##########
@@ -54,3 +54,15 @@ CREATE TABLE IF NOT EXISTS celeborn_cluster_tenant_config
PRIMARY KEY (id),
UNIQUE KEY `index_unique_tenant_config_key` (`cluster_id`, `tenant_id`, `name`, `config_key`)
);
+
+CREATE TABLE IF NOT EXISTS celeborn_cluster_tags
Review Comment:
Thanks @SteNicholas for the suggestion, created two separate sql files for 0.5.0 and 0.6.0 and a upgrade script to upgrade from 0.5.0 to 0.6.0. Also added a small README. PTAL.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-1618][CIP-11] Supporting tags via DB Config Service [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #2925:
URL: https://github.com/apache/celeborn/pull/2925#discussion_r1850479171
##########
service/src/main/resources/sql/mysql/celeborn-0.5.0-mysql.sql:
##########
@@ -54,3 +54,15 @@ CREATE TABLE IF NOT EXISTS celeborn_cluster_tenant_config
PRIMARY KEY (id),
UNIQUE KEY `index_unique_tenant_config_key` (`cluster_id`, `tenant_id`, `name`, `config_key`)
);
+
+CREATE TABLE IF NOT EXISTS celeborn_cluster_tags
Review Comment:
@s0nskar, you'd better to create new sql file for 0.6.0 and keep the current sql file for 0.5.0.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-1618][CIP-11] Supporting tags via DB Config Service [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #2925:
URL: https://github.com/apache/celeborn/pull/2925#discussion_r1850479171
##########
service/src/main/resources/sql/mysql/celeborn-0.5.0-mysql.sql:
##########
@@ -54,3 +54,15 @@ CREATE TABLE IF NOT EXISTS celeborn_cluster_tenant_config
PRIMARY KEY (id),
UNIQUE KEY `index_unique_tenant_config_key` (`cluster_id`, `tenant_id`, `name`, `config_key`)
);
+
+CREATE TABLE IF NOT EXISTS celeborn_cluster_tags
Review Comment:
You'd better to create new sql file for 0.6.0 and keep the current sql file for 0.5.0. You could refer to the mode in Kyuubi.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-1618][CIP-11] Supporting tags via DB Config Service [celeborn]
Posted by "FMX (via GitHub)" <gi...@apache.org>.
FMX closed pull request #2925: [CELEBORN-1618][CIP-11] Supporting tags via DB Config Service
URL: https://github.com/apache/celeborn/pull/2925
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-1618][CIP-11] Supporting tags via DB Config Service [celeborn]
Posted by "SteNicholas (via GitHub)" <gi...@apache.org>.
SteNicholas commented on code in PR #2925:
URL: https://github.com/apache/celeborn/pull/2925#discussion_r1850449253
##########
service/src/main/resources/sql/mysql/celeborn-0.5.0-mysql.sql:
##########
@@ -54,3 +54,15 @@ CREATE TABLE IF NOT EXISTS celeborn_cluster_tenant_config
PRIMARY KEY (id),
UNIQUE KEY `index_unique_tenant_config_key` (`cluster_id`, `tenant_id`, `name`, `config_key`)
);
+
+CREATE TABLE IF NOT EXISTS celeborn_cluster_tags
Review Comment:
@s0nskar, this sql file is created for 0.5.0 not for 0.6.0. Do we need to create new sql file for 0.6.0?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-1618][CIP-11] Supporting tags via DB Config Service [celeborn]
Posted by "FMX (via GitHub)" <gi...@apache.org>.
FMX commented on code in PR #2925:
URL: https://github.com/apache/celeborn/pull/2925#discussion_r1849856571
##########
service/src/main/java/org/apache/celeborn/server/common/service/config/SystemConfig.java:
##########
@@ -69,10 +57,26 @@ public void setConfigs(Map<String, String> configs) {
this.configs = configs;
}
+ public void setConfigs(List<ClusterSystemConfig> configs) {
+ Map<String, String> newConfigs = new HashMap<>();
+ for (ClusterSystemConfig c : configs) {
+ newConfigs.put(c.getConfigKey(), c.getConfigValue());
+ }
+ this.configs = newConfigs;
Review Comment:
Change this configs to volatile type if you intend to swap it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [CELEBORN-1618][CIP-11] Supporting tags via DB Config Service [celeborn]
Posted by "FMX (via GitHub)" <gi...@apache.org>.
FMX commented on code in PR #2925:
URL: https://github.com/apache/celeborn/pull/2925#discussion_r1850267878
##########
service/src/main/java/org/apache/celeborn/server/common/service/config/DynamicConfig.java:
##########
@@ -42,7 +42,7 @@
*/
public abstract class DynamicConfig {
private static final Logger LOG = LoggerFactory.getLogger(DynamicConfig.class);
- protected Map<String, String> configs = new HashMap<>();
+ protected volatile Map<String, String> configs = new HashMap<>();
Review Comment:
This map won't be updated by multiple threads concurrently.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@celeborn.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org