TOP

Flume使用大全之kafka source-kafka channel-hdfs(kerberos认证,SSL加密)
2018-12-04 02:19:27 】 浏览:326
Tags:Flume 使用 大全 kafka source-kafka channel-hdfs kerberos 认证 SSL 加密



agent.sources = kafkaSource1
agent.channels = kafkaChannel
agent.sinks = hdfsSink
agent.sources.kafkaSource1.channels = kafkaChannel
agent.sinks.hdfsSink.channel = kafkaChannel




agent.sources.kafkaSource1.type = org.apache.flume.source.kafka.KafkaSource
agent.sources.kafkaSource1.zookeeperConnect = node1:2181
agent.sources.kafkaSource1.kafka.bootstrap.servers = node7:9093
agent.sources.kafkaSource1.topic = bpu_sensor_router,bpu_sensor_record_present,bpu_group_status_present,bpu_gateway_heartbeat,bpu_gateway_router,bpu_sensor_heartbeat
agent.sources.kafkaSource1.consumer.group.id = flume
#agent.sources.kafkaSource1.kafka.consumer.timeout.ms = 100
agent.sources.kafkaSource1.batchSize = 500000
agent.sources.kafkaSource1.batchDurationMillis = 20000
agent.sources.kafkaSource1.kafka.consumer.security.protocol = SASL_SSL
agent.sources.kafkaSource1.kafka.consumer.sasl.mechanism = GSSAPI
agent.sources.kafkaSource1.kafka.consumer.sasl.kerberos.service.name = kafka
#目录及密码根据实际情况修改
agent.sources.kafkaSource1.kafka.consumer.ssl.truststore.location =/home/client/client.truststore.jks
agent.sources.kafkaSource1.kafka.consumer.ssl.truststore.password=test1234
agent.sources.kafkaSource1.kafka.consumer.ssl.keystore.location=/home/client/client.keystore.jks
agent.sources.kafkaSource1.kafka.consumer.ssl.keystore.password=pdas202
agent.sources.kafkaSource1.kafka.consumer.ssl.key.password=pdas202
agent.sources.kafkaSource1.kafka.consumer.timeout.ms = 500






agent.channels.kafkaChannel.type = org.apache.flume.channel.kafka.KafkaChannel
agent.channels.kafkaChannel.kafka.bootstrap.servers = node7:9093
agent.channels.kafkaChannel.zookeeperConnect = node1:2181
agent.channels.kafkaChannel.kafka.topic = flume-kafkaChannel
agent.channels.kafkaChannel.consumer.group.id = flume-consumer


#agent.channels.kafkaChannel.batchSize = 500000
#agent.channels.kafkaChannel.batchDurationMillis = 20000


#目录及密码根据实际情况修改
agent.channels.kafkaChannel.kafka.producer.security.protocol = SASL_SSL
agent.channels.kafkaChannel.kafka.producer.sasl.mechanism = GSSAPI
agent.channels.kafkaChannel.kafka.producer.sasl.kerberos.service.name = kafka
agent.channels.kafkaChannel.kafka.producer.ssl.truststore.location =/home/client/client.truststore.jks
agent.channels.kafkaChannel.kafka.producer.ssl.truststore.password=test1234
agent.channels.kafkaChannel.kafka.producer.ssl.keystore.location=/home/client/client.keystore.jks
agent.channels.kafkaChannel.kafka.producer.ssl.keystore.password=pdas202
agent.channels.kafkaChannel.kafka.producer.ssl.key.password=pdas202
agent.channels.kafkaChannel.kafka.producer.timeout.ms = 4000
agent.channels.kafkaChannel.kafka.consumer.security.protocol = SASL_SSL
agent.channels.kafkaChannel.kafka.consumer.sasl.mechanism = GSSAPI
agent.channels.kafkaChannel.kafka.consumer.sasl.kerberos.service.name = kafka
agent.channels.kafkaChannel.kafka.consumer.ssl.truststore.location =/home/client/client.truststore.jks
agent.channels.kafkaChannel.kafka.consumer.ssl.truststore.password=test1234
agent.channels.kafkaChannel.kafka.consumer.ssl.keystore.location=/home/client/client.keystore.jks
agent.channels.kafkaChannel.kafka.consumer.ssl.keystore.password=pdas202
agent.channels.kafkaChannel.kafka.consumer.ssl.key.password=pdas202
agent.channels.kafkaChannel.kafka.consumer.timeout.ms = 4000
agent.channels.kafkaChannel.capacity=10000
agent.channels.kafkaChannel.transactionCapacity=1000






#---------hdfsSink 相关配置------------------
agent.sinks.hdfsSink.type = hdfs
# 注意, 我们输出到下面一个子文件夹data中
agent.sinks.hdfsSink.hdfs.path = hdfs://nameservice1/user/hive/warehouse/%{topic}/%Y/%m/%d
agent.sinks.hdfsSink.hdfs.writeFormat = TEXT
agent.sinks.hdfsSink.hdfs.fileType = DataStream
agent.sinks.hdfsSink.hdfs.rollSize = 120000000
agent.sinks.hdfsSink.hdfs.rollInterval=60
agent.sinks.hdfsSink.hdfs.rollCount = 0
agent.sinks.hdfsSink.hdfs.batchSize = 15000
agent.sinks.hdfsSink.hdfs.round = true
agent.sinks.hdfsSink.hdfs.roundUnit = day
agent.sinks.hdfsSink1.hdfs.roundValue = 1
agent.sinks.hdfsSink.hdfs.threadsPoolSize = 25
agent.sinks.hdfsSink.hdfs.useLocalTimeStamp = true
agent.sinks.hdfsSink.hdfs.minBlockReplicas = 1
agent.sinks.hdfsSink.hdfs.idleTimeout = 30
agent.sinks.hdfsSink.hdfs.filePrefix= %{topic}


Flume使用大全之kafka source-kafka channel-hdfs(kerberos认证,SSL加密) https://www.cppentry.com/bencandy.php?fid=119&id=194250

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Flume采集数据到HDFS中,开头信息.. 下一篇Windows64环境下   使用Flum..