安裝Flume
1,到官網下載Flume,下載地址:http://flume.apache.org/download.html
2 ,[root@bicloud77 home]# tar zxvf apache-flume-1.5.2-bin.tar.gz
3, [root@bicloud77 home]# cd apache-flume-1.5.2-bin
4,[root@bicloud76 apache-flume-1.5.2-bin]# bin/flume-ng version
Flume 1.5.2
Source code repository: https://git-wip-us.apache.org/repos/asf/flume.git
Revision: 229442aa6835ee0faa17e3034bcab42754c460f5
Compiled by hshreedharan on Wed Nov 12 12:51:22 PST 2014
From source with checksum 837f81bd1e304a65fcaf8e5f692b3f18
5,安裝成功
6,啟動命令:bin/flume-ng agent -c conf -f conf/flume-conf -n a1 -Dflume.root.logger=DEBUG,console
Flume啟動參數
[root@bicloud77 bin]# ./flume-ng Error: Unknown or unspecified command ''Usage: ./flume-ng <command> [options]...commands: help display this help text agent run a Flume agent avro-client run an avro Flume client version show Flume version infoglobal options: --conf,-c <conf> use configs in <conf> directory --classpath,-C <cp> append to the classpath --dryrun,-d do not actually start Flume, just print the command --plugins-path <dirs> colon-separated list of plugins.d directories. See the plugins.d section in the user guide for more details. Default: $FLUME_HOME/plugins.d -Dproperty=value sets a Java system property value -Xproperty=value sets a Java -X optionagent options: --conf-file,-f <file> specify a config file (required) --name,-n <name> the name of this agent (required) --help,-h display help textavro-client options: --rpcProps,-P <file> RPC client properties file with server connection params --host,-H <host> hostname to which events will be sent --port,-p <port> port of the avro source --dirname <dir> directory to stream to avro source --filename,-F <file> text file to stream to avro source (default: std input) --headerFile,-R <file> File containing event headers as key/value pairs on each new line --help,-h display help text Either --rpcProps or both --host and --port must be specified.Note that if <conf> directory is specified, then it is always included firstin the classpath.
命令
參數
|
描述
|
help
|
列印協助資訊
|
agent
|
運行一個Flume Agent
|
avro-client
|
運行一個Avro Flume 用戶端
|
version
|
顯示Flume版本。
|
全域選項
參數
|
描述
|
--conf,-c <conf>
|
在<conf>目錄使用設定檔。指定設定檔放在什麼目錄
|
--classpath,-C <cp>
|
追加一個classpath
|
--dryrun,-d
|
不真正運行Agent,而只是列印命令一些資訊。
|
--plugins-path <dirs>
|
外掛程式目錄列表。預設:$FLUME_HOME/plugins.d
|
| -Dproperty=value |
設定一個JAVA系統屬性值。 |
| -Xproperty=value |
設定一個JAVA -X的選項。 |
Agent選項
參數
|
描述
|
--conf-file,-f <file>
|
指定設定檔,這個設定檔必須在全域選項的--conf參數定義的目錄下。(必填)
|
--name,-n <name>
|
Agent的名稱(必填)
|
--help,-h
|
協助
|
Avro用戶端選項
參數
|
描述
|
--rpcProps,-P <file>
|
串連參數的設定檔。
|
--host,-H <host>
|
Event所要發送到的Hostname。
|
--port,-p <port>
|
Avro Source的連接埠。
|
--dirname <dir>
|
Avro Source流到達的目錄。
|
| --filename,-F <file> |
Avro Source流到達的檔案名稱。 |
| --headerFile,-R <file> |
設定一個JAVA -X的選項。 |
啟動Avro用戶端要麼指定--rpcProps,要麼指定--host和--port。