flume hdfs rollSize not working in multi channels and multi sinks -
i trying use flume-ng grab 128mb of log information , put file in hdfs. hdfs rolling options not working. flume-ng send log file per seconds. how can fix flume.conf file?
agent01.sources = avrogensrc agent01.channels = memorychannel hdfschannel agent01.sinks = filesink hadoopsink # each 1 of sources, type defined agent01.sources.avrogensrc.type = avro agent01.sources.avrogensrc.bind = dev-hadoop03.ncl agent01.sources.avrogensrc.port = 3333 # channel can defined follows. agent01.sources.avrogensrc.channels = memorychannel hdfschannel # each sink's type must defined agent01.sinks.filesink.type = file_roll agent01.sinks.filesink.sink.directory = /home1/irteam/flume/data agent01.sinks.filesink.sink.rollinterval = 3600 agent01.sinks.filesink.sink.batchsize = 100 #specify channel sink should use agent01.sinks.filesink.channel = memorychannel agent01.sinks.hadoopsink.type = hdfs agent01.sinks.hadoopsink.hdfs.uselocaltimestamp = true agent01.sinks.hadoopsink.hdfs.path = hdfs://dev-hadoop04.ncl:9000/user/hive/warehouse/raw_logs/year=%y/month=%m/day=%d agent01.sinks.hadoopsink.hdfs.fileprefix = accesslog.%y-%m-%d.%hh agent01.sinks.hadoopsink.hdfs.filetype = datastream agent01.sinks.hadoopsink.hdfs.writeformat = text agent01.sinks.hadoopsink.hdfs.rollinterval = 0 agent01.sinks.hadoopsink.hdfs.rollsize = 134217728 agent01.sinks.hadoopsink.hdfs.rollcount = 0 #specify channel sink should use agent01.sinks.hadoopsink.channel = hdfschannel # each channel's type defined. agent01.channels.memorychannel.type = memory agent01.channels.hdfschannel.type = memory # other config values specific each type of channel(sink or source) # can defined # in case, specifies capacity of memory channel agent01.channels.memorychannel.capacity = 100000 agent01.channels.memorychannel.transactioncapacity = 10000 agent01.channels.hdfschannel.capacity = 100000 agent01.channels.hdfschannel.transactioncapacity = 10000
i found solution. dfs.replication mismatch cause problem.
in hadoop conf (hadoop-2.7.2/etc/hadoop/hdfs-site.xml
)
<property> <name>dfs.replication</name> <value>3</value> </property>
i have 2 data nodes change to
<property> <name>dfs.replication</name> <value>2</value> </property>
and add config in flume.conf
agent01.sinks.hadoopsink.hdfs.minblockreplicas = 2
thanks
https://qnalist.com/questions/5015704/hit-max-consecutive-under-replication-rotations-error
and
Comments
Post a Comment