Flume代理 - [tail -f / var / log / httpd / error_log]退出1

时间:2016-05-16 22:58:59

标签: flume-ng

我是新手。我的水槽代理不会将数据写入HDFS。请帮忙。这是代码。代码的目的是从apache获取数据并将其停放到HDFS。

#identify the components on agent a1
a1.sources = apache_server
a1.sinks = hdfs_sink
a1.channels = c1

# Configure the source:
a1.sources.apache_server.type = exec
a1.sources.apache_server.command = tail -f /var/log/httpd/error_log

# Describe the sink:

a1.sinks.hdfs_sink.type = hdfs
a1.sinks.hdfs_sink.hdfs.path = hdfs://hadoop1.example.com:9000/Apache_Logs
a1.sinks.hdfs_sink.hdfs.writeFormat = Text
a1.sinks.hdfs_sink.hdfs.fileType = DataStream
a1.sinks.hdfs-sink.hdfs.rollInterval = 10
a1.sinks.hdfs_sink.hdfs.rollSize = 0
a1.sinks.hdfs-sink.hdfs.filePrefix=apacheaccess

# Configure a channel that buffers events in memory:

a1.channels.c1.type = memory
a1.channels.c1.capacity = 20000
a1.channels.c1.transactionCapacity = 100

# Bind the source and sink to the channel:

a1.sources.apache_server.channels = c1
a1.sinks.hdfs_sink.channel = c1

0 个答案:

没有答案