Package org.apache.druid.discovery
Class DataNodeService
java.lang.Object
org.apache.druid.discovery.DruidService
org.apache.druid.discovery.DataNodeService
Metadata announced by any node that serves segments.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDataNodeService(String tier, long maxSize, Long storageSize, ServerType serverType, int priority) DataNodeService(String tier, long maxSize, Long storageSize, ServerType serverType, int priority, boolean isDiscoverable) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic DataNodeServicefromJson(String tier, long maxSize, Long storageSize, ServerType serverType, int priority) longgetName()intlonggetTier()inthashCode()booleantoString()
-
Field Details
-
DISCOVERY_SERVICE_KEY
- See Also:
-
SERVER_TYPE_PROP_KEY
- See Also:
-
-
Constructor Details
-
DataNodeService
public DataNodeService(String tier, long maxSize, @Nullable Long storageSize, ServerType serverType, int priority) -
DataNodeService
public DataNodeService(String tier, long maxSize, @Nullable Long storageSize, ServerType serverType, int priority, boolean isDiscoverable)
-
-
Method Details
-
fromJson
public static DataNodeService fromJson(String tier, long maxSize, @Nullable Long storageSize, ServerType serverType, int priority) -
getName
- Specified by:
getNamein classDruidService
-
getTier
-
getMaxSize
public long getMaxSize() -
getStorageSize
public long getStorageSize() -
getServerType
-
getPriority
public int getPriority() -
isDiscoverable
public boolean isDiscoverable()- Overrides:
isDiscoverablein classDruidService- Returns:
- Whether the service should be discoverable. The default implementation returns true. Some implementations may choose to override this so that the service is not discoverable if it has not been configured. This will not throw a fatal exception, but instead will just skip binding and log a message. This could be useful for optional configuration for the service.
-
equals
-
hashCode
public int hashCode() -
toString
-