Skip to content

Commit 07a68c0

Browse files
authored
HDDS-10583. Thread name prefix in ReplicationSupervisor is null (#6430)
1 parent 77384ea commit 07a68c0

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/replication/ReplicationSupervisor.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ public static class Builder {
106106
private Clock clock;
107107
private IntConsumer executorThreadUpdater = threadCount -> {
108108
};
109-
private String threadNamePrefix;
110109

111110
public Builder clock(Clock newClock) {
112111
clock = newClock;
@@ -138,11 +137,6 @@ public Builder executorThreadUpdater(IntConsumer newUpdater) {
138137
return this;
139138
}
140139

141-
public Builder threadNamePrefix(String threadPrefix) {
142-
this.threadNamePrefix = threadPrefix;
143-
return this;
144-
}
145-
146140
public ReplicationSupervisor build() {
147141
if (replicationConfig == null || datanodeConfig == null) {
148142
ConfigurationSource conf = new OzoneConfiguration();
@@ -162,6 +156,7 @@ public ReplicationSupervisor build() {
162156
if (executor == null) {
163157
LOG.info("Initializing replication supervisor with thread count = {}",
164158
replicationConfig.getReplicationMaxStreams());
159+
String threadNamePrefix = context != null ? context.getThreadNamePrefix() : "";
165160
ThreadFactory threadFactory = new ThreadFactoryBuilder()
166161
.setDaemon(true)
167162
.setNameFormat(threadNamePrefix + "ContainerReplicationThread-%d")

0 commit comments

Comments
 (0)