spooldir_r.conf(文件夹)

  1. a1.sources = r1
  2. a1.channels = c1
  3. a1.sinks = k1
  4. a1.sources.r1.type=spooldir
  5. a1.sources.r1.spoolDir=/home/centos/spool
  6. a1.sources.r1.fileHeader=true
  7. a1.sinks.k1.type=logger
  8. a1.channels.c1.type=memory
  9. a1.sources.r1.channels=c1
  10. a1.sinks.k1.channel=c1

avro_hop.conf

  1. #a1
  2. a1.sources = r1
  3. a1.sinks= k1
  4. a1.channels = c1
  5. a1.sources.r1.type=netcat
  6. a1.sources.r1.bind=localhost
  7. a1.sources.r1.port=8888
  8. a1.sinks.k1.type = avro
  9. a1.sinks.k1.hostname=localhost
  10. a1.sinks.k1.port=9999
  11. a1.channels.c1.type=memory
  12. a1.sources.r1.channels = c1
  13. a1.sinks.k1.channel = c1
  14. #a2
  15. a2.sources = r2
  16. a2.sinks= k2
  17. a2.channels = c2
  18. a2.sources.r2.type=avro
  19. a2.sources.r2.bind=localhost
  20. a2.sources.r2.port=9999
  21. a2.sinks.k2.type = logger
  22. a2.channels.c2.type=memory
  23. a2.sources.r2.channels = c2
  24. a2.sinks.k2.channel = c2

exec_r.conf

  1. a1.sources = r1
  2. a1.sinks = k1
  3. a1.channels = c1
  4. a1.sources.r1.type=exec
  5. a1.sources.r1.command=tail -F /home/centos/test.txt
  6. a1.sinks.k1.type=logger
  7. a1.channels.c1.type=memory
  8. a1.sources.r1.channels=c1
  9. a1.sinks.k1.channel=c1

file_c.conf

  1. a1.sources = r1
  2. a1.sinks= k1
  3. a1.channels = c1
  4. a1.sources.r1.type=netcat
  5. a1.sources.r1.bind=localhost
  6. a1.sources.r1.port=8888
  7. a1.sinks.k1.type=logger
  8. a1.channels.c1.type = file
  9. a1.channels.c1.checkpointDir = /home/centos/flume/fc_check
  10. a1.channels.c1.dataDirs = /home/centos/flume/fc_data
  11. a1.sources.r1.channels=c1
  12. a1.sinks.k1.channel=c1

hbase_k.conf

  1. hbase_k.confa1.sources = r1
  2. a1.channels = c1
  3. a1.sinks = k1
  4. a1.sources.r1.type = netcat
  5. a1.sources.r1.bind = localhost
  6. a1.sources.r1.port = 8888
  7. a1.sinks.k1.type = hbase
  8. a1.sinks.k1.table = ns1:t12
  9. a1.sinks.k1.columnFamily = f1
  10. a1.sinks.k1.serializer = org.apache.flume.sink.hbase.RegexHbaseEventSerializer
  11. a1.channels.c1.type=memory
  12. a1.sources.r1.channels = c1
  13. a1.sinks.k1.channel = c1

hdfs_k.conf

  1. hdfs_k.confa1.sources = r1
  2. a1.channels = c1
  3. a1.sinks = k1
  4. a1.sources.r1.type = netcat
  5. a1.sources.r1.bind = localhost
  6. a1.sources.r1.port = 8888
  7. a1.sinks.k1.type = hdfs
  8. a1.sinks.k1.hdfs.path = /user/centos/flume/%y/%m/%d/%H/%M/%S
  9. a1.sinks.k1.hdfs.filePrefix = events-
  10. a1.sinks.k1.hdfs.round = true
  11. a1.sinks.k1.hdfs.roundValue = 20
  12. a1.sinks.k1.hdfs.roundUnit = second
  13. a1.sinks.k1.hdfs.useLocalTimeStamp=true
  14. a1.sinks.k1.hdfs.rollInterval=10
  15. a1.sinks.k1.hdfs.rollSize=10
  16. a1.sinks.k1.hdfs.rollCount=3
  17. a1.channels.c1.type=memory
  18. a1.sources.r1.channels = c1
  19. a1.sinks.k1.channel = c1

helloworld.conf

  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing,
  12. # software distributed under the License is distributed on an
  13. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. # KIND, either express or implied. See the License for the
  15. # specific language governing permissions and limitations
  16. # under the License.
  17. # The configuration file needs to define the sources,
  18. # the channels and the sinks.
  19. # Sources, channels and sinks are defined per agent,
  20. # in this case called 'agent'
  21. a1.sources = r1
  22. a1.channels = c1
  23. a1.sinks = k1
  24. a1.sources.r1.type=netcat
  25. a1.sources.r1.bind=localhost
  26. a1.sources.r1.port=8888
  27. a1.sinks.k1.type=logger
  28. a1.channels.c1.type=memory
  29. a1.sources.r1.channels=c1
  30. a1.sinks.k1.channel=c1

kafka_c.conf

  1. a1.sources = r1
  2. a1.sinks = k1
  3. a1.channels = c1
  4. a1.sources.r1.type = avro
  5. a1.sources.r1.bind = localhost
  6. a1.sources.r1.port = 8888
  7. a1.sinks.k1.type = logger
  8. a1.channels.c1.type = org.apache.flume.channel.kafka.KafkaChannel
  9. a1.channels.c1.kafka.bootstrap.servers = s202:9092
  10. a1.channels.c1.kafka.topic = test3
  11. a1.channels.c1.kafka.consumer.group.id = g6
  12. a1.channels.c1.kafka.parseAsFlumeEvent = false
  13. a1.channels.c1.zookeeperConnect= s202:2181
  14. a1.sources.r1.channels = c1
  15. a1.sinks.k1.channel = c1

kafka_k.conf

  1. a1.sources = r1
  2. a1.sinks = k1
  3. a1.channels = c1
  4. a1.sources.r1.type=netcat
  5. a1.sources.r1.bind=localhost
  6. a1.sources.r1.port=8888
  7. a1.sinks.k1.type = org.apache.flume.sink.kafka.KafkaSink
  8. a1.sinks.k1.kafka.topic = test3
  9. a1.sinks.k1.kafka.bootstrap.servers = s202:9092
  10. a1.sinks.k1.kafka.flumeBatchSize = 20
  11. a1.sinks.k1.kafka.producer.acks = 1
  12. a1.channels.c1.type=memory
  13. a1.sources.r1.channels = c1
  14. a1.sinks.k1.channel = c1

kafka_r.conf

  1. a1.sources = r1
  2. a1.sinks = k1
  3. a1.channels = c1
  4. a1.sources.r1.type = org.apache.flume.source.kafka.KafkaSource
  5. a1.sources.r1.batchSize = 5000
  6. a1.sources.r1.batchDurationMillis = 2000
  7. a1.sources.r1.kafka.bootstrap.servers = s202:9092
  8. a1.sources.r1.kafka.topics = test3
  9. a1.sources.r1.kafka.consumer.group.id = g4
  10. a1.sinks.k1.type = logger
  11. a1.channels.c1.type=memory
  12. a1.sources.r1.channels = c1
  13. a1.sinks.k1.channel = c1

seq_r.conf

  1. a1.sources = r1
  2. a1.channels = c1
  3. a1.sinks = k1
  4. a1.sources.r1.type=seq
  5. a1.sources.r1.totalEvents=1000
  6. a1.sinks.k1.type=logger
  7. a1.channels.c1.type=memory
  8. a1.sources.r1.channels=c1
  9. a1.sinks.k1.channel=c1

spillable_c.conf

  1. a1.sources = r1
  2. a1.sinks= k1
  3. a1.channels = c1
  4. a1.sources.r1.type=netcat
  5. a1.sources.r1.bind=localhost
  6. a1.sources.r1.port=8888
  7. a1.sinks.k1.type=logger
  8. a1.channels.c1.type = SPILLABLEMEMORY
  9. a1.channels.c1.memoryCapacity = 0
  10. a1.channels.c1.overflowCapacity = 2000
  11. a1.channels.c1.byteCapacity = 800000
  12. a1.channels.c1.checkpointDir = /user/centos/flume/fc_check
  13. a1.channels.c1.dataDirs = /user/centos/flume/fc_data
  14. a1.sources.r1.channels=c1
  15. a1.sinks.k1.channel=c1