DataNode: make the cluster name configurable (#17143)

* make the cluster name configurable

* added changelog

* precise, that it's the data node we talk about in the CL

Co-authored-by: Matthias Oesterheld <33032967+moesterheld@users.noreply.github.com>

---------

Co-authored-by: Matthias Oesterheld <33032967+moesterheld@users.noreply.github.com>
This commit is contained in:
Jan Heise
2023-11-02 11:06:22 +01:00
committed by GitHub
parent d0818df262
commit 27f79d7913
3 changed files with 14 additions and 4 deletions

View File

@@ -176,6 +176,9 @@ public class Configuration extends BaseConfiguration {
@Parameter(value = "hostname")
private String hostname = null;
@Parameter(value = "clustername")
private String clustername = "datanode-cluster";
@Parameter(value = "http_publish_uri", validator = URIAbsoluteValidator.class)
private URI httpPublishUri;
@@ -248,7 +251,6 @@ public class Configuration extends BaseConfiguration {
* This is a pointer to a directory holding configuration files (and certificates) for the datanode itself.
* We treat it as read only for the datanode and should never persist anything in it.
* Use {@link DatanodeDirectories} to obtain a reference to this directory.
*
*/
@Nullable
public Path getDatanodeConfigurationLocation() {
@@ -357,6 +359,10 @@ public class Configuration extends BaseConfiguration {
return datanodeHttpPort;
}
public String getClustername() {
return clustername;
}
public static class NodeIdFileValidator implements Validator<String> {
@Override
public void validate(String name, String path) throws ValidationException {