adoroszlai commented on code in PR #7853:
URL: https://github.com/apache/ozone/pull/7853#discussion_r1955131947
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java:
##########
@@ -340,15 +340,12 @@ public class OmMetadataManagerImpl implements
OMMetadataManager,
*/
public OmMetadataManagerImpl(OzoneConfiguration conf,
OzoneManager ozoneManager) throws IOException {
- this(conf, ozoneManager, null);
- }
-
- public OmMetadataManagerImpl(OzoneConfiguration conf,
- OzoneManager ozoneManager,
- OMPerformanceMetrics perfMetrics)
- throws IOException {
this.ozoneManager = ozoneManager;
- this.perfMetrics = perfMetrics;
+ if (this.ozoneManager == null) {
+ this.perfMetrics = null;
+ } else {
+ this.perfMetrics = this.ozoneManager.getPerfMetrics();
+ }
Review Comment:
nit: reduce verbosity
```suggestion
perfMetrics = ozoneManager != null ? ozoneManager.getPerfMetrics() :
null;
```
--
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]