xichen01 commented on code in PR #4798:
URL: https://github.com/apache/ozone/pull/4798#discussion_r1333181754
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/DatanodeConfiguration.java:
##########
@@ -137,7 +146,7 @@ public class DatanodeConfiguration {
* missed. With max threads 5, optimistically DN can handle 1500 individual
* container delete tx in 60s with RocksDB cache miss.
*/
- @Config(key = "block.delete.threads.max",
+ @Config(key = BLOCK_DELETE_THREAD_MAX,
Review Comment:
If we change a configuration's value, if only need to change the value
itself, and no additional operations are performed. we can just add a
`reconfigurable = true` in `@Config` annotation. the reconfigurable
configuration can be auto registered.
```java
reconfigurationHandler =
new ReconfigurationHandler("DN", conf, this::checkAdminPrivilege)
.register(HDDS_DATANODE_BLOCK_DELETE_THREAD_MAX,
this::reconfigBlockDeleteThreadMax)
.register(OZONE_BLOCK_DELETING_SERVICE_WORKERS,
this::reconfigDeletingServiceWorkers)
.register(conf.getObject(DatanodeConfiguration.class)); //
register the reconfigurable configuration
```
then this configuration's value can be modify in runtime by `ozone admin
reconfig` command.
But If need to do something extra when modifying the configuration value,
such as modifying the thread pool (`block.delete.threads.max`), we need to
register the operation manually.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]