<commit_before>package com.navercorp.pinpoint.common.server.hbase;

import com.navercorp.pinpoint.common.hbase.distributor.RangeOneByteSimpleHash;
import com.sematext.hbase.wd.RowKeyDistributorByHashPrefix;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class DistributorConfiguration {

    @Bean("applicationTraceIndexDistributor")
    public RowKeyDistributorByHashPrefix getApplicationTraceIndexDistributor() {
        RowKeyDistributorByHashPrefix.Hasher hasher = newOneByteSimpleHash(32);
        return new RowKeyDistributorByHashPrefix(hasher);
    }

    private RowKeyDistributorByHashPrefix.Hasher newOneByteSimpleHash(int maxBuckets) {
        return new RowKeyDistributorByHashPrefix.OneByteSimpleHash(maxBuckets);
    }

    @Bean("traceV2Distributor")
    public RowKeyDistributorByHashPrefix getTraceV2Distributor() {
        RowKeyDistributorByHashPrefix.Hasher hasher = newRangeOneByteSimpleHash(32, 40, 256);
        return new RowKeyDistributorByHashPrefix(hasher);
    }

    @Bean("applicationStatRowKeyDistributor")
    public RowKeyDistributorByHashPrefix getApplicationStatRowKeyDistributor() {
        RowKeyDistributorByHashPrefix.Hasher hasher = newRangeOneByteSimpleHash(0, 33, 64);
        return new RowKeyDistributorByHashPrefix(hasher);
    }

    @Bean("agentStatV2RowKeyDistributor")
    public RowKeyDistributorByHashPrefix getAgentStatV2RowKeyDistributor() {
        RowKeyDistributorByHashPrefix.Hasher hasher = newRangeOneByteSimpleHash(0, 33, 64);
        return new RowKeyDistributorByHashPrefix(hasher);
    }

    @Bean("metadataRowKeyDistributor")
    public RowKeyDistributorByHashPrefix getMetadataRowKeyDistributor() {
        RowKeyDistributorByHashPrefix.Hasher hasher = newRangeOneByteSimpleHash(0, 33, 8);
        return new RowKeyDistributorByHashPrefix(hasher);
    }<commit_msg>[#noissue] Remove duplicate distributor configuration<commit_after>package com.navercorp.pinpoint.common.server.hbase;

import com.navercorp.pinpoint.common.hbase.distributor.RangeOneByteSimpleHash;
import com.sematext.hbase.wd.RowKeyDistributorByHashPrefix;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class DistributorConfiguration {

    @Bean("applicationTraceIndexDistributor")
    public RowKeyDistributorByHashPrefix getApplicationTraceIndexDistributor() {
        RowKeyDistributorByHashPrefix.Hasher hasher = newOneByteSimpleHash(32);
        return new RowKeyDistributorByHashPrefix(hasher);
    }

    private RowKeyDistributorByHashPrefix.Hasher newOneByteSimpleHash(int maxBuckets) {
        return new RowKeyDistributorByHashPrefix.OneByteSimpleHash(maxBuckets);
    }

    @Bean("traceV2Distributor")
    public RowKeyDistributorByHashPrefix getTraceV2Distributor() {
        RowKeyDistributorByHashPrefix.Hasher hasher = newRangeOneByteSimpleHash(32, 40, 256);
        return new RowKeyDistributorByHashPrefix(hasher);
    }

    @Bean("applicationStatRowKeyDistributor")
    public RowKeyDistributorByHashPrefix getApplicationStatRowKeyDistributor() {
        RowKeyDistributorByHashPrefix.Hasher hasher = newRangeOneByteSimpleHash(0, 33, 64);
        return new RowKeyDistributorByHashPrefix(hasher);
    }

    @Bean("agentStatV2RowKeyDistributor")
    public RowKeyDistributorByHashPrefix getAgentStatV2RowKeyDistributor() {
        RowKeyDistributorByHashPrefix.Hasher hasher = newRangeOneByteSimpleHash(0, 33, 64);
        return new RowKeyDistributorByHashPrefix(hasher);
    }

    @Bean("metadataRowKeyDistributor")
    public RowKeyDistributorByHashPrefix getMetadataRowKeyDistributor() {
        RowKeyDistributorByHashPrefix.Hasher hasher = newRangeOneByteSimpleHash(0, 32, 8);
        return new RowKeyDistributorByHashPrefix(hasher);
    }
{'fraction_non_alphanumeric': 0.07032457496136012, 'fraction_numerical': 0.013910355486862442, 'mean_word_length': 5.637606837606838, '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': '3115607', 'n_tokens_mistral': 1194, 'n_tokens_neox': 1074, 'n_words': 162}