egor-ryashin commented on a change in pull request #6349: maintenance mode for
Historical
URL: https://github.com/apache/incubator-druid/pull/6349#discussion_r224491367
##########
File path:
server/src/main/java/org/apache/druid/server/coordinator/CoordinatorDynamicConfig.java
##########
@@ -192,6 +212,35 @@ public int getMaxSegmentsInNodeLoadingQueue()
return maxSegmentsInNodeLoadingQueue;
}
+ /**
+ * Historical nodes list in maintenance mode. Coordinator doesn't assign new
segments on those nodes and moves
+ * segments from those nodes according to a specified priority.
+ *
+ * @return list of host:port entries
+ */
+ @JsonProperty
+ public Set<String> getHistoricalNodesInMaintenance()
Review comment:
It's possible, but it works intensively with `DruidServerMetadata` which
contains simple `String`, and `HostAndPort` doesn't provide efficient
`toString()`:
```java
/** Rebuild the host:port string, including brackets if necessary. */
@Override
public String toString() {
StringBuilder builder = new StringBuilder(host.length() + 7);
if (host.indexOf(':') >= 0) {
builder.append('[').append(host).append(']');
} else {
builder.append(host);
}
if (hasPort()) {
builder.append(':').append(port);
}
return builder.toString();
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]