use of com.sequenceiq.cloudbreak.orchestrator.salt.domain.FingerprintsResponse in project cloudbreak by hortonworks.
the class MinionAcceptor method proceedWithAcceptingMinions.
private void proceedWithAcceptingMinions(SaltConnector sc, List<String> unacceptedMinions) throws CloudbreakOrchestratorFailedException {
LOGGER.info("There are unaccepted minions on master: {}", unacceptedMinions);
Map<String, String> fingerprintsFromMaster = fetchFingerprintsFromMaster(sc, unacceptedMinions);
List<Minion> minionsToAccept = minions.stream().filter(minion -> unacceptedMinions.contains(minion.getId())).collect(Collectors.toList());
LOGGER.info("Processing the following minions so they are accepted on the master: {}", minionsToAccept.stream().map(Minion::getId).collect(Collectors.toList()));
if (!minionsToAccept.isEmpty()) {
FingerprintsResponse fingerprintsResponse = fingerprintCollector.collectFingerprintFromMinions(sc, minionsToAccept);
acceptMatchingFingerprints(sc, fingerprintsFromMaster, fingerprintsResponse, minionsToAccept);
}
}
Aggregations