Created 07-17-2018 01:17 PM
I want to load streaming data through a spool directory on to HDFS. I have been using the following configuration file for the same.
# Describe/configure the source
a1.sources.r1.type = spooldir
a1.sources.r1.spoolDir = /root/spool
a1.sources.r1.fileHeader = true
a1.sources.r1.interceptors = timestampInterceptor
a1.sources.r1.interceptors.timestampInterceptor.type = timestamp
# Describe the sink
a1.sinks.k1.type = hdfs
a1.sinks.k1.hdfs.path = /user/root/flume/example
a1.sinks.k1.hdfs.fileType= DataStream
a1.sinks.k1.hdfs.writeFormat= Text
a1.sinks.k1.hdfs.rollInterval = 30
# Use a channel which buffers events in memory
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100
# Bind the source and sink to the channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1
Flume agent command -
cd /usr/hdp/current/flume-server/bin
./flume-ng agent --conf conf --conf-file ~/flumelogs.conf --name a1 -Dflume.root.logger=INFO,console
I have recently upgraded Hortonworks to version 2.6.
These commands worked fine for me with version 2.5 but I got the following error with the new version.
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console. Set system property 'log4j2.debug' to show Log4j2 internal initialization logging.
Could you please help me a workaround for this issue?
Created 08-28-2018 01:20 AM
I faced a similar issue while running the flume command from the command line in HDP 2.6.
/usr/hdp/current/flume-server/bin/flume-ng agent --name agent --conf /usr/hdp/current/flume-server/conf/agent --conf-file /usr/hdp/current/flume-server/conf/agent/flume.conf
I resloved this issue by copying the log4j2.xml file in the location: /usr/hdp/current/flume-server/conf/agent
Created 08-28-2018 01:20 AM
I faced a similar issue while running the flume command from the command line in HDP 2.6.
/usr/hdp/current/flume-server/bin/flume-ng agent --name agent --conf /usr/hdp/current/flume-server/conf/agent --conf-file /usr/hdp/current/flume-server/conf/agent/flume.conf
I resloved this issue by copying the log4j2.xml file in the location: /usr/hdp/current/flume-server/conf/agent
Created on 10-27-2019 11:01 AM - edited 10-27-2019 11:11 AM
Where did you paste log4j2.xml?
I solved the problem by adding the following :
-Dlog4j.configurationFile=/usr/hdp/current/flume-server/conf/log4j2.xml
My whole command is:
/usr/hdp/current/flume-server/bin/flume-ng agent --conf conf --conf-file /home/maria_dev/flume_uygulama_01/flumelogs.conf --name a1 -Dflume.root.logger=INFO,console -Dlog4j.configurationFile=/usr/hdp/current/flume-server/conf/log4j2.xml