<commit_before>Best Practices and Recommendation Configuration
===============================================

To explain some tips to configure a correct properties we will use the .properties from previous sections:

::

    a.sources=avroSource
    a.channels=cassandraChan hBaseChan
    a.sinks=cassandraSink hBaseSink

    #### SOURCES ######
    a.sources.avroSource.interceptors = morphlineinterceptor
    a.sources.avroSource.interceptors.morphlineinterceptor.type = org.apache.flume.sink.solr.morphline.MorphlineInterceptor$Builder
    a.sources.avroSource.interceptors.morphlineinterceptor.morphlineFile = conf/interceptor.conf
    a.sources.avroSource.interceptors.morphlineinterceptor.morphlineId = morphline1

    a.sources.avroSource.type = avro
    a.sources.avroSource.bind = 0.0.0.0
    a.sources.avroSource.port = 4141

    ###### CHANNELS ######
    a.channels.cassandraChan.type=memory
    a.channels.cassandraChan.capacity = 20000
    a.channels.cassandraChan.transactionCapacity = 100

    ###### SINKS ######
    a.sinks.cassandraSink.type=com.stratio.ingestion.sink.cassandra.CassandraSink
    a.sinks.cassandraSink.tables=orders.orders
    a.sinks.cassandraSink.batchSize=100
    a.sinks.cassandraSink.hosts=cs.cassandra.local.dev:9042
    a.sinks.cassandraSink.cqlFile=conf/init-cassandra-orders.cql

    ####### MAPPING #####
    a.sources.avroSource.channels=cassandraChan
    a.sinks.cassandraSink.channel=cassandraChan

For a correct build of the properties there are few fields required to be filled or the build will fail:

    - Names of the components:
<commit_msg>Documentation improved<commit_after>Best Practices and Recommendation Configuration
===============================================

To explain some tips to configure a correct properties we will use the .properties from previous sections:

::

    a.sources=avroSource
    a.channels=cassandraChan hBaseChan
    a.sinks=cassandraSink hBaseSink

    #### SOURCES ######
    a.sources.avroSource.interceptors = morphlineinterceptor
    a.sources.avroSource.interceptors.morphlineinterceptor.type = org.apache.flume.sink.solr.morphline.MorphlineInterceptor$Builder
    a.sources.avroSource.interceptors.morphlineinterceptor.morphlineFile = conf/interceptor.conf
    a.sources.avroSource.interceptors.morphlineinterceptor.morphlineId = morphline1

    a.sources.avroSource.type = avro
    a.sources.avroSource.bind = 0.0.0.0
    a.sources.avroSource.port = 4141

    ###### CHANNELS ######
    a.channels.cassandraChan.type=memory
    a.channels.cassandraChan.capacity = 20000
    a.channels.cassandraChan.transactionCapacity = 100

    ###### SINKS ######
    a.sinks.cassandraSink.type=com.stratio.ingestion.sink.cassandra.CassandraSink
    a.sinks.cassandraSink.tables=orders.orders
    a.sinks.cassandraSink.batchSize=100
    a.sinks.cassandraSink.hosts=cs.cassandra.local.dev:9042
    a.sinks.cassandraSink.cqlFile=conf/init-cassandra-orders.cql

    ####### MAPPING #####
    a.sources.avroSource.channels=cassandraChan
    a.sinks.cassandraSink.channel=cassandraChan


For a correct build of the properties there are few fields required to be filled or the build will fail:

    - Names of the components:

{'fraction_non_alphanumeric': 0.13021806853582554, 'fraction_numerical': 0.014953271028037384, 'mean_word_length': 4.3785594639865995, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '7043682', 'n_tokens_mistral': 1092, 'n_tokens_neox': 1028, 'n_words': 163}