Flume

作者: lixinxin | 来源:发表于2017-12-28 10:58 被阅读23次

安装Flume 1.6.0-cdh5.7.0

配置环境变量

export FLUME_HOME=/root/app/apache-flume-1.6.0-cdh5.7.0-bin
export PATH=$FLUME_HOME/bin:$PATH

配置Flume JAVA_HOME

/root/app/apache-flume-1.6.0-cdh5.7.0-bin/conf
/flume-env.sh
export JAVA_HOME=/usr/local/jdk8

配置 conf

A) 配置Source
B)配置 Channnel
C)配置 Sink
D) 把以上三个组件串起来


# Define a memory channel called ch1 on agent1
agent1.channels.ch1.type = memory
 
# Define an Avro source called avro-source1 on agent1 and tell it
# to bind to 0.0.0.0:41414. Connect it to channel ch1.
a1.sources.avro-source1.channels = ch1
a1.sources.avro-source1.type = avro
a1.sources.avro-source1.bind = 0.0.0.0
a1.sources.avro-source1.port = 41414
 
# Define a logger sink that simply logs all events it receives
# and connect it to the other end of the same channel.
a1.sinks.log-sink1.channel = ch1
a1.sinks.log-sink1.type = logger
 
# Finally, now that we've defined all of our components, tell
# agent1 which ones we want to activate.
a1.channels = ch1
a1.sources = avro-source1
a1.sinks = log-sink1
# Name the components on this agent
a1.sources = r1
a1.sinks = k1
a1.channels = c1
 
# Define source

a1.sources.r1.type = netcat
a1.sources.r1.bind = lixinxin
a1.sources.r1.port = 44444

# Define sink
a1.sinks.k1.type = logger

#Define a memory channel called ch1 on agent1
a1.channels.c1.type = memory

#Bind the source and sink to channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1

启动agent

flume-ng agent \
--name a1 \
--conf $FLUME_HOME/conf \
--conf-file $FLUME_HOME/conf/example.conf \
-Dflume.root.logger=INFO,console
flume配置agent.png
启动flume.png

停止 flume

ps -ef|grep flume
 kill -9 pid

相关文章

  • Flume01

    Flume架构组成 Flume 负载均衡 Flume Agent内部原理 启动 Flume 监听

  • Flume

    总结 一、Flume的定义 1、flume的优势 2、flume的组成 3、flume的架构 二、 flume部署...

  • 玩转大数据计算之Flume

    Flume版本:我们使用Flume最新的版本:Flume NG 1.7.0 Flume架构Flume是一个分布式的...

  • Flume 入门

    一:Flume是什么: 二:特点: 三:Flume版本介绍 四:Flume NG基本架构 五:Flume NG核心...

  • flume的部署和测试

    1 flume 安装 flume下载:http://flume.apache.org/download.htmlf...

  • 091-BigData-19Flume与Flume之间数据传递

    上一篇:090-BigData-18Flume Flume与Flume之间数据传递 一、单Flume多Channe...

  • java大数据之flume

    一、Flume简介 1.1 Flume的位置 1.2 Flume是什么 (1)Flume提供一种分布式的,可靠地,...

  • Flume(一)概述

    Flume图标 Flume图标 Flume定义 Apache Flume是一个分布式,可靠且可用的系统,用于有效地...

  • Flume pull方式和push方式整合

    Pull方式 Flume Agent 编写 启动Flume Push方式 Flume Agent的编写 启动flu...

  • 4.Flume1.9安装

    1 Flume安装部署 1.1 安装地址 (1) Flume官网地址:http://flume.apache.or...

网友评论

      本文标题:Flume

      本文链接:https://www.haomeiwen.com/subject/sbipgxtx.html