<commit_before>package com.sequenceiq.datalake.configuration;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;

import com.sequenceiq.datalake.service.registry.DNSServiceAddressResolver;
import com.sequenceiq.datalake.service.registry.RetryingServiceAddressResolver;
import com.sequenceiq.datalake.service.registry.ServiceAddressResolver;
import com.sequenceiq.datalake.service.registry.ServiceAddressResolvingException;

@Configuration
public class ServiceEndpointConfig {
    @Value("${datalake.address.resolving.timeout:60000}")
    private int resolvingTimeout;

    @Value("${datalake.db.port.5432.tcp.addr:}")
    private String dbHost;

    @Value("${datalake.db.port.5432.tcp.port:}")
    private String dbPort;

    @Value("${datalake.db.serviceid:}")
    private String databaseId;

    @Value("${datalake.identity.server.url:}")
    private String identityServiceUrl;

    @Value("${datalake.identity.serviceid:}")
    private String identityServiceId;

    @Value("${datalake.cloudbreak.url:}")
    private String cloudbreakUrl;

    @Value("${datalake.cloudbreak.serviceid:}")
    private String cloudbreakServiceId;

    @Bean
    public ServiceAddressResolver serviceAddressResolver() {
        return new RetryingServiceAddressResolver(new DNSServiceAddressResolver(), resolvingTimeout);
    }

    @Bean
    @DependsOn("serviceAddressResolver")
    public String databaseAddress(ServiceAddressResolver serviceAddressResolver) throws ServiceAddressResolvingException {
        return serviceAddressResolver.resolveHostPort(dbHost, dbPort, databaseId);
    }

    @Bean
    @DependsOn("serviceAddressResolver")
    public String identityServerUrl(ServiceAddressResolver serviceAddressResolver) throws ServiceAddressResolvingException {
        return serviceAddressResolver.resolveUrl(identityServiceUrl, "http", identityServiceId);
    }

    @Bean
    @DependsOn("serviceAddressResolver")
    public String cloudbreakUrl(ServiceAddressResolver serviceAddressResolver) throws ServiceAddressResolvingException {
        return serviceAddressResolver.resolveUrl(cloudbreakUrl, "http", cloudbreakServiceId);
    }
}
<commit_msg>CB-3 Remove unecessary identity server address resolver<commit_after>package com.sequenceiq.datalake.configuration;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;

import com.sequenceiq.datalake.service.registry.DNSServiceAddressResolver;
import com.sequenceiq.datalake.service.registry.RetryingServiceAddressResolver;
import com.sequenceiq.datalake.service.registry.ServiceAddressResolver;
import com.sequenceiq.datalake.service.registry.ServiceAddressResolvingException;

@Configuration
public class ServiceEndpointConfig {
    @Value("${datalake.address.resolving.timeout:60000}")
    private int resolvingTimeout;

    @Value("${datalake.db.port.5432.tcp.addr:}")
    private String dbHost;

    @Value("${datalake.db.port.5432.tcp.port:}")
    private String dbPort;

    @Value("${datalake.db.serviceid:}")
    private String databaseId;

    @Value("${datalake.cloudbreak.url:}")
    private String cloudbreakUrl;

    @Value("${datalake.cloudbreak.serviceid:}")
    private String cloudbreakServiceId;

    @Bean
    public ServiceAddressResolver serviceAddressResolver() {
        return new RetryingServiceAddressResolver(new DNSServiceAddressResolver(), resolvingTimeout);
    }

    @Bean
    @DependsOn("serviceAddressResolver")
    public String databaseAddress(ServiceAddressResolver serviceAddressResolver) throws ServiceAddressResolvingException {
        return serviceAddressResolver.resolveHostPort(dbHost, dbPort, databaseId);
    }

    @Bean
    @DependsOn("serviceAddressResolver")
    public String cloudbreakUrl(ServiceAddressResolver serviceAddressResolver) throws ServiceAddressResolvingException {
        return serviceAddressResolver.resolveUrl(cloudbreakUrl, "http", cloudbreakServiceId);
    }
}

{'fraction_non_alphanumeric': 0.0949456778460085, 'fraction_numerical': 0.006376948512045347, 'mean_word_length': 5.732909379968204, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3960965', 'n_tokens_mistral': 1135, 'n_tokens_neox': 1113, 'n_words': 184}