final String osName = node.getJvm().getSystemProperties().get("os.name");
if (null != osName && osName.startsWith("Windows")) {
LOG.debug("Skipping open file limit check for Indexer node <{}> on Windows", node.getNode().getName());
} else if (node.getProcess().getMaxFileDescriptors() < MINIMUM_OPEN_FILES_LIMIT) {
// Write notification.
final Notification notification = notificationService.buildNow()
.addType(Notification.Type.ES_OPEN_FILES)
.addSeverity(Notification.Severity.URGENT);
if (notificationService.publishIfFirst(notification)) {
LOG.warn("Indexer node <{}> open file limit is too low: [{}]. Set it to at least {}.",
node.getNode().getName(),
node.getProcess().getMaxFileDescriptors(),
MINIMUM_OPEN_FILES_LIMIT);
}
allHigher = false;
}
}
if (allHigher) {
Notification notification = notificationService.build().addType(Notification.Type.ES_OPEN_FILES);
notificationService.fixed(notification);
}
}