上傳到虛擬機器指定目錄,解壓t
tar -xzf apache-flume-1.7.0-bin.tar.gz
進入flume下的conf檔案下複製flume-conf.properties修改名稱為example.conf(名字可以隨便改在啟動命令是注意名稱就行)
修改example.conf檔案
儲存退出# 指定agent的元件名稱
a1.sources = r1
a1.sinks = k1
a1.channels = c1
# 指定flume source(要監聽的路徑)
a1.sources.r1.type = spooldir
a1.sources.r1.spooldir = /home/hadoop/log
# 指定flume sink
a1.sinks.k1.type = logger
# 指定flume channel
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactioncapacity = 100
# 繫結source和sink到channel上
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1
啟動在flume目錄下,這裡都是bin、conf等資料夾
bin/flume-ng agent --conf conf --conf-file conf/example.conf --name a1 -dflume.root.logger=info,console
//這裡的example.conf是你的配置檔案
flume簡單認識
第一次寫部落格,不知到如何寫好這篇部落格,有不足和錯誤的地方希望多多指出,共同交流進步。下面就開始說一說我所了解的flume這個框架,flume是個資料採集框架。當然,先要了解資料的 有哪些,才能知道flume是如何來採集資料的。好,下面我們就先來看看資料的 有哪些 有web伺服器產生的log日誌檔...
flume簡單案例
從指定網路埠輸出資料到控制台 編寫example.conf檔案在flume的conf資料夾下 name the components on this agent a1.sources r1 a1.sinks k1 a1.channels c1 describe configure the sourc...
flume入門配置 簡單例項(一)
一 基本概念 1.source 2.channel 3.sink 二 配置檔案 通常寫在 conf下。舉個例子 在flume目錄下 vi conf flume conf.properties 1.寫source channel sink名字 2.確定哪個source連線哪個channel 哪個cha...