xBis7 commented on PR #3948: URL: https://github.com/apache/ozone/pull/3948#issuecomment-1311751986
> The datanodes crash if this is not set? The ozone.metadata.dirs are optional fallback and recommended to not be set in production environments. Hey @neils-dev thanks for looking into this. It doesn't seem optional for the datanode. It might not be used but it has to be specified. If not specified, then we will get a null pointer exception in `HddsDatanodeService.start()` while initializing [DatanodeLayoutStorage](https://github.com/xBis7/ozone/blob/master/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeService.java#L267). The `DatanodeLayoutStorage` [constructor](https://github.com/xBis7/ozone/blob/master/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/DatanodeLayoutStorage.java#L46) passes to the parent class the parameter `ServerUtils.getOzoneMetaDirPath(conf)` which in return calls this [method](https://github.com/xBis7/ozone/blob/master/hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/server/ServerUtils.java#L194-L207) that relies only on the config value for `ozone.metadata.dirs`. There is no fallback or an alternative value to be used, so if it's null then the datanode service won't start and the datanode shuts down. -- 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]
