我对通过水槽发送到kafka的文件大小有一点问题 我不知道问题出在哪里 但是如果文件大小大于数字x,则会将文件分割为多个部分。 导致丢失想要作为输出的json格式的东西。 如果有可能帮助我找到解决方案,我不知道是否更改为传输保留的大小或强制文件保持完整。
水槽配置:
# Name the components on this agent
a1.sources = r1
a1.sinks = k1
a1.channels = c1
# Describe/configure the source
a1.sources.r1.type = spooldir
a1.sources.r1.spoolDir = /root/Bureau/V1/outputCV
a1.sources.r1.fileHeader = true
a1.sources.r1.interceptors = timestampInterceptor
a1.sources.r1.interceptors.timestampInterceptor.type = timestamp
a1.sources.r1.hnadler = org.apache.flume.source.http.JSONHandler
# Describe the sink
a1.sinks.k1.type = org.apache.flume.sink.kafka.KafkaSink
a1.sinks.k1.kafka.topic = flumekafka
a1.sinks.k1.kafka.bootstrap.servers =
quickstart.cloudera:9090,quickstart.cloudera:9091,quickstart.cloudera:9092
a1.sinks.k1.kafka.flumeBatchSize = 200000
a1.sinks.k1.kafka.producer.acks = 1
a1.sinks.k1.kafka.producer.linger.ms = 1
a1.sinks.k1.kafka.producer.compression.type = snappy
# Use a channel which buffers events in memory
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000000
a1.channels.c1.transactionCapacity = 100000
# Bind the source and sink to the channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1
kafka配置:
默认不做任何更改