sh cca175-problem-07-step-02-flume.sh
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh cca175-problem-07-step-02-flume.sh相关的知识,希望对你有一定的参考价值。
mkdir flume-logs
cd flume-logs
// create flume configuration file
# Name the components on this agent
a1.sources = r1
a1.sinks = k1
a1.channels = c1
# Describe/configure the source
a1.sources.r1.type = exec
a1.sources.r1.command = tail -F /opt/gen_logs/logs/access.log
# Describe the sink
a1.sinks.k1.type = hdfs
a1.sinks.k1.hdfs.path = /user/cloudera/problem7/step2
a1.sinks.k1.hdfs.fileSuffix = .log
a1.sinks.k1.hdfs.writeFormat = Text
a1.sinks.k1.hdfs.fileType = DataStream
# Use a channel which buffers events in memory
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 200
# Bind the source and sink to the channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1
// create hdfs sink directory
hadoop fs -mkdir /user/cloudera/problem7/sink
// Run the flume-agent
flume-ng agent --name a1 --conf . --conf-file f.config
以上是关于sh cca175-problem-07-step-02-flume.sh的主要内容,如果未能解决你的问题,请参考以下文章
sh cca175-problem-03-partitioning.sh
sh cca175-problem-06-import.sh
sh cca175-problem-5-step-7-validation.sh
sh cca175-problem-02-sqoop-and-hdfs.sh
sh cca175-problem-03-import-all-tables.sh
sh cca175-problem-03-create-hive-table.sh