Real-time Event statistics Project: Optimizing Flume: Replacing MEM Channel with file channel

Source: Internet
Author: User
Tags solr

Background: Use KAFKA+FLUME+MORPHLINE+SOLR to do real-time statistics.

SOLR has no data since December 23. View Log discovery because a colleague added a malformed buried point data, resulting in a lot of error.

It is inferred that because the use of MEM channel is full, the message is too late to process, resulting in the loss of new data.

Modify flume to use the file channel:

Kafka2solr.sources =SOURCE_FROM_KAFKAKAFKA2SOLR. Channels =FILE_CHANNELKAFKA2SOLR. Sinks =Solrsink#for each one of the sources, the type is definedKafka2solr.sources.source_from_kafka.type = Org.apache.flume.source.kafka.KAFKASOURCEKAFKA2SOLR. Sources.source_from_kafka.channels =FILE_CHANNELKAFKA2SOLR. sources.source_from_kafka.batchSize = -KAFKA2SOLR. sources.source_from_kafka.useflumeeventformat=FALSEKAFKA2SOLR. sources.source_from_kafka.kafka.bootstrap.servers= KAFKANODE0:9092, Kafkanode1:9092, Kafkanode2:9092KAFKA2SOLR. Sources.source_from_kafka.kafka.topics =EVENTCOUNTKAFKA2SOLR. sources.source_from_kafka.kafka.consumer.group.id =FLUME_SOLR_CALLERKAFKA2SOLR. Sources.source_from_kafka.kafka.consumer.auto.offset.Reset=Latest#File ChannelKafka2solr.channels.file_channel.type =FILEKAFKA2SOLR. Channels.file_channel.checkpointDir =/var/Log/flume-ng/CHECKPOINTKAFKA2SOLR. Channels.file_channel.dataDirs =/var/Log/flume-ng/DATAKAFKA2SOLR. Sinks.solrSink.type = Org.apache.flume.sink.solr.morphline.MORPHLINESOLRSINKKAFKA2SOLR. Sinks.solrSink.channel =File_channel#kafka2solr.sinks.solrSink.batchSize = 1000#kafka2solr.sinks.solrsink.batchdurationmillis =Kafka2solr.sinks.solrSink.morphlineFile = Morphlines.CONFKAFKA2SOLR. sinks.solrsink.morphlineid=MORPHLINE1KAFKA2SOLR. sinks.solrsink.isignoringrecoverableexceptions=true

Makes data persistent to disk is not lost.

Real-time Event statistics Project: Optimizing Flume: Replacing MEM Channel with file channel

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.