AngersZhuuuu commented on code in PR #2336: URL: https://github.com/apache/incubator-celeborn/pull/2336#discussion_r1505246484
########## docs/developers/configuration.md: ########## @@ -0,0 +1,171 @@ +--- +license: | + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--- + +# Configuration +Celeborn configuration is separated into static and dynamic configuration, of which details refer to [Configuration Guide](../configuration/index.md). + +## Static Configuration +Static configuration `CelebornConf` loads configurations from default configuration file `$CELEBORN_HOME/conf/celeborn-defaults.conf`. + +## Dynamic Configuration +Dynamic configuration is a type of configuration that can be changed dynamically at runtime as needed, which overrides corresponding static +configuration at runtime of Celeborn `Master` and `Worker`. The `isDynamic` property represents whether the configuration key is dynamic +in [All Configurations](../configuration/index.md#all-configurations). It means that the configurations with dynamic property support dynamic +configuration and refresh at runtime. + +### Config Level +At present dynamic configuration supports various config levels including: + +- `SYSTEM`: The system configurations. +- `TENANT`: The dynamic configurations of tenant id. +- `TENANT_USER`: The dynamic configurations of tenant id and username. + +When applying dynamic configuration, the priority order of config levels is as follows: + +- `SYSTEM` level configuration overrides the static configuration, which in turn overrides the configuration of `CelebornConf`. +When the system level configuration is missing, fallback to the static configuration of `CelebornConf`. +- `TENANT` level configuration overrides `SYSTEM` level, which result in that a configuration of certain tenant id overrides the configuration at system level. +When the tenant level configuration is missing, fallback to the dynamic configuration at system level. +- `TENANT_USER` level configuration overrides `TENANT` level, which result in a configuration of certain tenant id and username overrides the configuration at tenant level. +When the tenant user level configuration is missing, fallback to the dynamic configuration at tenant level. + +## Config Service +Config service provides the configuration management service with local cache for the static and dynamic configuration. +Meanwhile, `ConfigService` is a pluggable service interface of which implementation is based on various store backend. +The store backend of `ConfigService` is configured via `celeborn.dynamicConfig.store.backend`, which supports filesystem(`FS`) +and database(`DB`) store backend. If the store backend is not provided, it means that config service is disabled. + +### FileSystem Config Service +Filesystem config service supports the configurations stored in the dynamic configuration file, of which path is configured +via `celeborn.dynamicConfig.store.fs.path`. The template of the dynamic configuration is as follows: + +```yaml +# SYSTEM level configuration +- level: SYSTEM + config: + [config_key]: [config_val] + ... + +# TENANT level configuration +- tenantId: [tenant_id] + level: TENANT + config: + [config_key]: [config_val] + ... + users: + # TENANT_USER level configuration + - name: [name] + config: + [config_key]: [config_val] + ... +``` +For example, a Celeborn worker has 10 storage directories or disks and the buffer size is set to 256 KiB. The tenantId1 Review Comment: ``` `tenantId1` ``` ########## docs/developers/configuration.md: ########## @@ -0,0 +1,171 @@ +--- +license: | + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--- + +# Configuration +Celeborn configuration is separated into static and dynamic configuration, of which details refer to [Configuration Guide](../configuration/index.md). + +## Static Configuration +Static configuration `CelebornConf` loads configurations from default configuration file `$CELEBORN_HOME/conf/celeborn-defaults.conf`. + +## Dynamic Configuration +Dynamic configuration is a type of configuration that can be changed dynamically at runtime as needed, which overrides corresponding static +configuration at runtime of Celeborn `Master` and `Worker`. The `isDynamic` property represents whether the configuration key is dynamic +in [All Configurations](../configuration/index.md#all-configurations). It means that the configurations with dynamic property support dynamic +configuration and refresh at runtime. + +### Config Level +At present dynamic configuration supports various config levels including: + +- `SYSTEM`: The system configurations. +- `TENANT`: The dynamic configurations of tenant id. +- `TENANT_USER`: The dynamic configurations of tenant id and username. + +When applying dynamic configuration, the priority order of config levels is as follows: + +- `SYSTEM` level configuration overrides the static configuration, which in turn overrides the configuration of `CelebornConf`. +When the system level configuration is missing, fallback to the static configuration of `CelebornConf`. +- `TENANT` level configuration overrides `SYSTEM` level, which result in that a configuration of certain tenant id overrides the configuration at system level. +When the tenant level configuration is missing, fallback to the dynamic configuration at system level. +- `TENANT_USER` level configuration overrides `TENANT` level, which result in a configuration of certain tenant id and username overrides the configuration at tenant level. +When the tenant user level configuration is missing, fallback to the dynamic configuration at tenant level. + +## Config Service +Config service provides the configuration management service with local cache for the static and dynamic configuration. +Meanwhile, `ConfigService` is a pluggable service interface of which implementation is based on various store backend. +The store backend of `ConfigService` is configured via `celeborn.dynamicConfig.store.backend`, which supports filesystem(`FS`) +and database(`DB`) store backend. If the store backend is not provided, it means that config service is disabled. + +### FileSystem Config Service +Filesystem config service supports the configurations stored in the dynamic configuration file, of which path is configured +via `celeborn.dynamicConfig.store.fs.path`. The template of the dynamic configuration is as follows: + +```yaml +# SYSTEM level configuration +- level: SYSTEM + config: + [config_key]: [config_val] + ... + +# TENANT level configuration +- tenantId: [tenant_id] + level: TENANT + config: + [config_key]: [config_val] + ... + users: + # TENANT_USER level configuration + - name: [name] + config: + [config_key]: [config_val] + ... +``` +For example, a Celeborn worker has 10 storage directories or disks and the buffer size is set to 256 KiB. The tenantId1 +only uses half of the storage and sets the buffer size to 128 KiB. Meanwhile, the user1 needs to change the buffer size Review Comment: ``` `user1` ``` ########## docs/developers/configuration.md: ########## @@ -0,0 +1,171 @@ +--- +license: | + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--- + +# Configuration +Celeborn configuration is separated into static and dynamic configuration, of which details refer to [Configuration Guide](../configuration/index.md). + +## Static Configuration +Static configuration `CelebornConf` loads configurations from default configuration file `$CELEBORN_HOME/conf/celeborn-defaults.conf`. + +## Dynamic Configuration +Dynamic configuration is a type of configuration that can be changed dynamically at runtime as needed, which overrides corresponding static +configuration at runtime of Celeborn `Master` and `Worker`. The `isDynamic` property represents whether the configuration key is dynamic +in [All Configurations](../configuration/index.md#all-configurations). It means that the configurations with dynamic property support dynamic +configuration and refresh at runtime. + +### Config Level +At present dynamic configuration supports various config levels including: + +- `SYSTEM`: The system configurations. +- `TENANT`: The dynamic configurations of tenant id. +- `TENANT_USER`: The dynamic configurations of tenant id and username. + +When applying dynamic configuration, the priority order of config levels is as follows: + +- `SYSTEM` level configuration overrides the static configuration, which in turn overrides the configuration of `CelebornConf`. +When the system level configuration is missing, fallback to the static configuration of `CelebornConf`. +- `TENANT` level configuration overrides `SYSTEM` level, which result in that a configuration of certain tenant id overrides the configuration at system level. +When the tenant level configuration is missing, fallback to the dynamic configuration at system level. +- `TENANT_USER` level configuration overrides `TENANT` level, which result in a configuration of certain tenant id and username overrides the configuration at tenant level. +When the tenant user level configuration is missing, fallback to the dynamic configuration at tenant level. + +## Config Service +Config service provides the configuration management service with local cache for the static and dynamic configuration. +Meanwhile, `ConfigService` is a pluggable service interface of which implementation is based on various store backend. +The store backend of `ConfigService` is configured via `celeborn.dynamicConfig.store.backend`, which supports filesystem(`FS`) +and database(`DB`) store backend. If the store backend is not provided, it means that config service is disabled. Review Comment: `which supports filesystem(`FS`) and database(`DB`) store backend at present.` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
