环境介绍: 主服务器ip:192.168.80.128

1、准备apache-flume-1.7.0-bin.tar文件

2、上传到master(192.168.80.128)服务器上

3、解压apache-flume-1.7.0-bin.tar

 tar -zxvf apache-flume-1.7.0-bin.tar

4、进入到Flume的配置文件目录

cd /apache-flume-1.7.0-bin/conf

5、修改apache-flume-1.7.0-bin/conf的里面内容

a1.sources = r1 

a1.sinks = k1 

a1.channels = c1

a1.sources.r1.type = netcat 

a1.sources.r1.bind = localhost 

a1.sources.r1.port = 44444

a1.sinks.k1.type = logger

a1.channels.c1.type = memory

a1.channels.c1.capacity = 1000 

a1.channels.c1.transactionCapacity = 100

a1.sources.r1.channels = c1 

a1.sinks.k1.channel = c1

5、启动Flume程序

bin/flume-ng agent --conf conf --conf-file /home/hadoop/apache-flume-1.7.0-bin/conf/flume-conf.properties --name a1 -Dflume.root.logger=INFO,console

ps:如果后台启动,在步骤5的基础上再加入

-n agent1 > log.log 2>&1 &

6、在另外的窗口输入 telnet localhost 44444

Hadoop实战-Flume之Hello world(九)的更多相关文章

  1. Hadoop实战-Flume之自定义Sink(十九)

    import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import j ...

  2. Hadoop实战-Flume之Source multiplexing(十五)

    a1.sources = r1 a1.sinks = k1 k2 a1.channels = c1 c2 # Describe/configure the source a1.sources.r1.t ...

  3. Hadoop实战-Flume之自定义Source(十八)

    import java.nio.charset.Charset; import java.util.HashMap; import java.util.Random; import org.apach ...

  4. Hadoop实战-Flume之Sink Load-balancing(十七)

    a1.sources = r1 a1.sinks = k1 k2 a1.channels = c1 # Describe/configure the source a1.sources.r1.type ...

  5. Hadoop实战-Flume之Sink Failover(十六)

    a1.sources = r1 a1.sinks = k1 k2 a1.channels = c1 # Describe/configure the source a1.sources.r1.type ...

  6. Hadoop实战-Flume之Source replicating(十四)

    a1.sources = r1 a1.sinks = k1 k2 a1.channels = c1 c2 # Describe/configure the source a1.sources.r1.t ...

  7. Hadoop实战-Flume之Hdfs Sink(十)

    a1.sources = r1 a1.sinks = k1 a1.channels = c1 # Describe/configure the source a1.sources.r1.type = ...

  8. Hadoop实战-Flume之Source regex_filter(十三)

    a1.sources = r1 a1.sinks = k1 a1.channels = c1 # Describe/configure the source a1.sources.r1.type = ...

  9. Hadoop实战-Flume之Source regex_extractor(十二)

    a1.sources = r1 a1.sinks = k1 a1.channels = c1 # Describe/configure the source a1.sources.r1.type = ...

随机推荐

  1. SPI设备的驱动

    主要包括两个SPI设备步骤:register_chrdevspi_register_driver关键点1:spi_board_info可以去已经运行的板子下面找例子:/sys/bus/spi/driv ...

  2. Python的格式化输出,基本运算符,编码

    一. 格式化输出现在有以下需求,让用户输入name, age, job,hobby 然后输出如下所示: -----------info of Alex Li----------- Name : Ale ...

  3. http错误种类及原因

    http://blog.csdn.net/dxykevin/article/details/50950878 [摘要]HTTP状态码(HTTP Status Code)是用以表示网页服务器HTTP响应 ...

  4. Codeforces 622F The Sum of the k-th Powers(数论)

    题目链接 The Sum of the k-th Powers 其实我也不懂为什么这么做的……看了无数题解觉得好厉害哇…… #include <bits/stdc++.h> using n ...

  5. HTTP状态码之200和304

    HTTP状态码之200和304   HTTP状态码(HTTP Status Code)是一种表示网页服务器响应状态的三位数字编码.通过这些数字,可以简化状态的表达.状态码有几十种,其中首位数字为1-5 ...

  6. Interface Builder中的技巧

    在我工作中经常会遇到有人吐槽Xcode中的interface builder(以下简称IB)不好用的开发者.在我看来,IB是一个非常棒的可视化开发工具,可以非常快捷的设置UI控件的大部分常用属性.下面 ...

  7. 邁向IT專家成功之路的三十則鐵律 鐵律十二:IT人養生之道-德行

    所謂的「養生」在中國古代裡所指的是針對內在精神層面修為的提升,到了近代中醫所謂的養生,則除了包含最根本的內在精神層面之外,還涵蓋了外在身體的養護.在現今各行各業的人士當中,嚴格來說都應該要有一套專屬的 ...

  8. Android 打开其他程序

    Intent intent = new Intent(); intent.setComponent(new ComponentName("所要打开的程序包名", "所要打 ...

  9. Please configure Spring facet or use 'Create Default Context' to add one including all unmapped files.

    有时候我们刚进入 Intellij IDEA时会出现这样一个情况,原因是IDEA没有找到spring的配置文件,我们需要添加spring文件给idea管理 参考: 1.https://www.jetb ...

  10. react 路由传参

    今天,我们要讨论的是react router中Link传值的三种表现形式.分别为通过通配符传参.query传参和state传参. ps:进入正题前,先说明一下,以下的所有内容都是在react-rout ...