The error below being thrown by Historical node when the Druid cluster loading the data segment.
2021-10-01T01:51:13,538 WARN [Coordinator-Exec–0] org.apache.druid.server.coordinator.rules.LoadRule - No available [_default_tier] servers or node capacity to assign primary segment
Solution
This error happened because the Druid cluster has only one Histroical node and the segment is configured to create two replicas (default) of each segment. To solve the error there is two ways.
Solution 1
The easiest solution. Spin up few more historical nodes according to the configuration needs.
Solution 2
If spinning more node server is not possible. We can configure the segment to only create lesser replica for each segment.
-
Login to the Druid UI console and click on “Datasources”.
-
Look your datasource and click edit button.
-
Click “Edit retention rules”
In my case, I have only have the default rule and below is the configuration
-
Decrease the number of replicants according to your cluster. In my case, I will set it to 1.
-
Click “Next”
-
Describe your changes and hit “Save”.
-
Done.
In case, after you apply either one of the solution mentioned above and the error still happening. There is another configuration in Historical Node you might want to check it out:
druid.segmentCache.locations= [{"path":"/druid/data/segment-cache","maxSize":100737418240}]
Make sure the maxSize
is enough for the segment. Click here to understand more about the configuration.
Reference
- Github Issue ticket - link