APISonar


com.yahoo.config.provision.ProvisionLogger.log

> com > yahoo > config > provision > ProvisionLogger > log
com APIs yahoo APIs config APIs provision APIs ProvisionLogger APIs log APIs

Example 1
public List<HostSpec> prepare(ApplicationId application, ClusterSpec cluster, Capacity requestedCapacity, int groups, ProvisionLogger logger) {
        log.log(LogLevel.DEBUG, () -> "Received deploy prepare request for " + requestedCapacity + " in " +
                                      groups + " groups for application " + application + ", cluster " + cluster);

        Flavor flavor = capacityPolicies.decideFlavor(requestedCapacity, cluster);
        int nodeCount = capacityPolicies.decideSize(requestedCapacity);
        int effectiveGroups = groups > nodeCount ? nodeCount : groups; // cannot have more groups than nodes

        if (zone.environment().isManuallyDeployed() && nodeCount < requestedCapacity.nodeCount())
            logger.log(Level.WARNING, "Requested " + requestedCapacity.nodeCount() + " nodes for " + cluster +
                                      ", downscaling to " + nodeCount + " nodes in " + zone.environment());

        return asSortedHosts(preparer.prepare(application, cluster, nodeCount, flavor, effectiveGroups));
    }