环境:hadoop2.8.5、flume1.9、Ubuntu18.04
问题:使用flume监听网络端口,传入数据测试时发现特定汉字传入会被强制关闭连接,如图
更换过flume1.6发现仍然是这个问题
flume配置如下:
a1.sources = r1
a1.sinks = k1
a1.channels = c1
#a1.sources.r1.type = spooldir
#a1.sources.r1.spoolDir = /usr/local/ceshi
a1.sources.r1.type = netcat
a1.sources.r1.bind = 0.0.0.0
a1.sources.r1.port = 5555
a1.sources.r1.interceptors = i1
a1.sources.r1.interceptors.i1.type = timestamp
#a1.sources.r1.inputCharset = UTF-8
a1.sinks.k1.type=hdfs
a1.sinks.k1.channel=c1
a1.sinks.k1.hdfs.useLocalTimeStamp=true
a1.sinks.k1.hdfs.path=hdfs://master:9000/flume
a1.sinks.k1.hdfs.filePrefix=%Y%m%d%H_
a1.sinks.k1.hdfs.minBlockReplicas=1
a1.sinks.k1.hdfs.fileType=DataStream
a1.sinks.k1.hdfs.writeFormat=Writable
a1.sinks.k1.hdfs.rollInterval=900
a1.sinks.k1.hdfs.rollSize=1024000
a1.sinks.k1.hdfs.rollCount=0
a1.sinks.k1.hdfs.idleTimeout=0
a1.channels.c1.type = file
a1.channels.c1.checkpointDir = /var/log/flume-ng/checkpoint
a1.channels.c1.dataDirs = /var/log/flume-ng/data
a1.sources.r1.channels=c1
a1.sinks.k1.channel = c1
问题出现的环境背景及自己尝试过哪些方法
相关代码
// 请把代码文本粘贴到下方(请勿用图片代替代码)