use of org.graylog2.indexer.cluster.health.ByteSize in project graylog2-server by Graylog2.
the class IndexerClusterCheckerThreadTest method buildThresholdTriggeredClusterAllocationDiskSettingsAbsolute.
private ClusterAllocationDiskSettings buildThresholdTriggeredClusterAllocationDiskSettingsAbsolute(Notification.Type expectedNotificationType) {
ByteSize low;
ByteSize high;
ByteSize floodStage;
if (expectedNotificationType == ES_NODE_DISK_WATERMARK_LOW) {
low = SIUnitParser.parseBytesSizeValue("35GB");
high = SIUnitParser.parseBytesSizeValue("10GB");
floodStage = SIUnitParser.parseBytesSizeValue("5GB");
} else if (expectedNotificationType == Notification.Type.ES_NODE_DISK_WATERMARK_HIGH) {
low = SIUnitParser.parseBytesSizeValue("45GB");
high = SIUnitParser.parseBytesSizeValue("35GB");
floodStage = SIUnitParser.parseBytesSizeValue("5GB");
} else {
low = SIUnitParser.parseBytesSizeValue("55GB");
high = SIUnitParser.parseBytesSizeValue("45GB");
floodStage = SIUnitParser.parseBytesSizeValue("35GB");
}
return ClusterAllocationDiskSettings.create(true, new AbsoluteValueWatermarkSettings.Builder().low(low).high(high).floodStage(floodStage).build());
}
Aggregations