public enum NodeRole extends Enum<NodeRole>
ServerType (also called "node type" in various places) because they are
essentially the same abstraction, but merging them could only increase the complexity and drop the code safety,
because they name the same types differently ("peon" - "indexer-executor" and "middleManager" - "realtime") and both
expose them via JSON APIs.
These abstractions can probably be merged when Druid updates to Jackson 2.9 that supports JsonAliases, see
see https://github.com/apache/druid/issues/7152.| Enum Constant and Description |
|---|
BROKER |
COORDINATOR |
HISTORICAL |
INDEXER |
MIDDLE_MANAGER |
OVERLORD |
PEON |
ROUTER |
| Modifier and Type | Method and Description |
|---|---|
String |
getJsonName()
Lowercase for backward compatibility, as a part of the
DiscoveryDruidNode's JSON format. |
static NodeRole |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NodeRole[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NodeRole COORDINATOR
public static final NodeRole HISTORICAL
public static final NodeRole BROKER
public static final NodeRole OVERLORD
public static final NodeRole PEON
public static final NodeRole ROUTER
public static final NodeRole MIDDLE_MANAGER
public static final NodeRole INDEXER
public static NodeRole[] values()
for (NodeRole c : NodeRole.values()) System.out.println(c);
public static NodeRole valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String getJsonName()
DiscoveryDruidNode's JSON format.
Don't need to define JsonCreator because for enum types JsonValue
serves for both serialization and deserialization, see the Javadoc comment of JsonValue.Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.