"Flume" Flume multiple output branches configuration, multi-sink, multi-channel

Source: Internet
Author: User

Here simply put a configuration bar, there are questions welcome message discussion

Configuration of the sink

############################# #define [sink] begin############################## #define the sink k1a1.sinks.k1.type= hdfsa1.sinks.k1.channel=c1a1.sinks.k1.hdfs.uselocaltimestamp=truea1.sinks.k1.hdfs.path=hdfs:// 192.168.11.177:9000/flume/events/%y/%m/%da1.sinks.k1.hdfs.fileprefix=cmcc-%ha1.sinks.k1.hdfs.filetype= Datastreama1.sinks.k1.hdfs.minblockreplicas=1a1.sinks.k1.hdfs.rollinterval=3600a1.sinks.k1.hdfs.rollsize= 0a1.sinks.k1.hdfs.rollcount=0a1.sinks.k1.hdfs.idletimeout=0#define the sink k2a1.sinks.k2.channel= c2a1.sinks.k2.type=com.cmcc.chiwei.kafka.cmcckafkasinka1.sinks.k2.metadata.broker.list= 192.168.11.174:9092,192.168.11.175:9092,192.168.11.196:9092a1.sinks.k2.partition.key= 0a1.sinks.k2.partitioner.class=com.cmcc.chiwei.kafka.cmccpartitiona1.sinks.k2.serializer.class= kafka.serializer.stringencodera1.sinks.k2.request.required.acks=0a1.sinks.k2.cmcc.encoding= utf-8a1.sinks.k2.cmcc.topic.name=cmcca1.sinks.k2.producer.type=asynca1.sinks.k2.batchsize=100################# ############ #define [sink] end############################## 
Here is the same data no difference sink to multiple outputs, so the channel is the replication mode

A1.sources.r1.selector.type=replicating
One is Kafka, in order to improve performance, with memory channels, one to HDFs, offline analysis, with file channels

############################# #define [Channel] begin############################## #define the channel c1a1.channels.c1.type=filea1.channels.c1.checkpointdir=/home/flume/flumecheckpointa1.channels.c1.datadirs=/ Home/flume/flumedata,/home/flume/flumedataexta1.channels.c1.capacity=2000000a1.channels.c1.transactioncapacity =100#define the channel c2a1.channels.c2.type=memorya1.channels.c2.capacity= 2000000a1.channels.c2.transactioncapacity=100############################# #define [Channel] end################# #############
The above is the non-differential data output multiple sink configuration, if you want to different data to different sink, need to use the Channel multiplexing mode, please refer to "Channel multiplexing"



"Flume" Flume multiple output branches configuration, multi-sink, multi-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.