adoroszlai commented on code in PR #5407:
URL: https://github.com/apache/ozone/pull/5407#discussion_r1363421419
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -454,6 +455,7 @@ public final class OzoneManager extends
ServiceRuntimeInfoImpl
private final OMPerformanceMetrics perfMetrics;
private boolean fsSnapshotEnabled;
+ private String threadNamePrefix;
Review Comment:
Only one of
`private final String threadPrefix;`
and
`private String threadNamePrefix;`
is needed. (Let's use `threadNamePrefix`, but make it final.)
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java:
##########
@@ -500,7 +502,7 @@ private OzoneManager(OzoneConfiguration conf, StartupOption
startupOption)
this.isSecurityEnabled = OzoneSecurityUtil.isSecurityEnabled(conf);
this.peerNodesMap = omhaNodeDetails.getPeerNodesMap();
this.omNodeDetails = omhaNodeDetails.getLocalNodeDetails();
-
+ this.threadNamePrefix = omNodeDetails.threadNamePrefix();
Review Comment:
Let's keep the assignment in line 532, after `this.omNodeDetails.getNodeId()
== null` (which might affect the prefix).
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/TrashPolicyOzone.java:
##########
@@ -118,8 +119,8 @@ public void initialize(Configuration conf, FileSystem fs) {
@Override
public Runnable getEmptier() throws IOException {
- return new TrashPolicyOzone.Emptier((OzoneConfiguration)configuration,
- emptierInterval);
+ return new TrashPolicyOzone.Emptier((OzoneConfiguration) configuration,
+ emptierInterval, om.getNodeDetails().threadNamePrefix());
Review Comment:
Access `om.getThreadNamePrefix()` directly.
--
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]