Class DruidNode

java.lang.Object
org.apache.druid.server.DruidNode

public class DruidNode extends Object
  • Field Details

  • Constructor Details

    • DruidNode

      public DruidNode(String serviceName, String host, boolean bindOnHost, Integer plaintextPort, Integer tlsPort, boolean enablePlaintextPort, boolean enableTlsPort)
    • DruidNode

      public DruidNode(String serviceName, String host, boolean bindOnHost, Integer plaintextPort, Integer port, Integer tlsPort, Boolean enablePlaintextPort, boolean enableTlsPort, @Nullable Map<String,String> labels)
      host = null , port = null -> host = _default_, port = -1 host = "abc:123", port = null -> host = abc, port = 123 host = "abc:fff", port = null -> throw IAE (invalid ipv6 host) host = "2001:db8:85a3::8a2e:370:7334", port = null -> host = 2001:db8:85a3::8a2e:370:7334, port = _auto_ host = "[2001:db8:85a3::8a2e:370:7334]", port = null -> host = 2001:db8:85a3::8a2e:370:7334, port = _auto_ host = "abc" , port = null -> host = abc, port = _auto_ host = "abc" , port = 123 -> host = abc, port = 123 host = "abc:123 , port = 123 -> host = abc, port = 123 host = "abc:123 , port = 456 -> throw IAE (conflicting port) host = "abc:fff , port = 456 -> throw IAE (invalid ipv6 host) host = "[2001:db8:85a3::8a2e:370:7334]:123", port = null -> host = 2001:db8:85a3::8a2e:370:7334, port = 123 host = "[2001:db8:85a3::8a2e:370:7334]", port = 123 -> host = 2001:db8:85a3::8a2e:370:7334, port = 123 host = "2001:db8:85a3::8a2e:370:7334", port = 123 -> host = 2001:db8:85a3::8a2e:370:7334, port = 123 host = null , port = 123 -> host = _default_, port = 123
  • Method Details

    • getLabels

      @Nullable public Map<String,String> getLabels()
    • getServiceName

      public String getServiceName()
    • getHost

      public String getHost()
    • isBindOnHost

      public boolean isBindOnHost()
    • getPlaintextPort

      public int getPlaintextPort()
    • isEnablePlaintextPort

      public boolean isEnablePlaintextPort()
    • isEnableTlsPort

      public boolean isEnableTlsPort()
    • getTlsPort

      public int getTlsPort()
    • getVersion

      public String getVersion()
    • getBuildRevision

      public String getBuildRevision()
    • withService

      public DruidNode withService(String service)
    • getServiceScheme

      public String getServiceScheme()
    • getHostAndPort

      public String getHostAndPort()
      Returns host and port together as something that can be used as part of a URI.
    • getHostAndTlsPort

      public String getHostAndTlsPort()
    • getPortToUse

      public int getPortToUse()
    • getHostAndPortToUse

      public String getHostAndPortToUse()
    • getUriToUse

      public URI getUriToUse()
    • getDefaultHost

      public static String getDefaultHost()
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object