Skip to content

Instantly share code, notes, and snippets.

@hakanilter
Last active May 17, 2018 16:17
Show Gist options
  • Save hakanilter/852ffb7fecace2f84dec90f7989fde92 to your computer and use it in GitHub Desktop.
Save hakanilter/852ffb7fecace2f84dec90f7989fde92 to your computer and use it in GitHub Desktop.
Example Flume Configuration For Kafka Source
tier1.sources = source1
tier1.channels = channel1
tier1.sinks = sink1
# sources
tier1.sources.source1.type = org.apache.flume.source.kafka.KafkaSource
tier1.sources.source1.zookeeperConnect = localhost:2181
tier1.sources.source1.topic = network-data
tier1.sources.source1.groupId = flume-kafka-test
tier1.sources.source1.channels = channel1
tier1.sources.source1.kafka.consumer.timeout.ms = 100
# channels
tier1.channels.channel1.type = memory
tier1.channels.channel1.capacity = 10000
tier1.channels.channel1.transactionCapacity = 1000
# sinks
tier1.sinks.sink1.type = hdfs
tier1.sinks.sink1.hdfs.path = /user/hadoop/kafka/%{topic}/%Y-%m-%d
tier1.sinks.sink1.hdfs.filePrefix = %{topic}.data
tier1.sinks.sink1.hdfs.writeFormat = Text
tier1.sinks.sink1.hdfs.fileType = CompressedStream
tier1.sinks.sink1.hdfs.codeC = snappy
tier1.sinks.sink1.hdfs.fileSuffix = .json.snappy
tier1.sinks.sink1.hdfs.inUsePrefix = .
tier1.sinks.sink1.hdfs.rollInterval = 3600
tier1.sinks.sink1.hdfs.rollSize = 128000000
tier1.sinks.sink1.hdfs.rollCount = 0
tier1.sinks.sink1.hdfs.idleTimeout = 3600
tier1.sinks.sink1.hdfs.useLocalTimeStamp = true
tier1.sinks.sink1.channel = channel1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment