欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Linux搭建Flume开发环境

程序员文章站 2022-05-12 10:13:20
...
1.Linux搭建Flume环境
2.官网下载Flume安装包:apache-flume-1.8.0-bin.tar.gz,   利用xftp5工具上传到:/usr/local/flume
 
3.利用xshell5工具登录到服务器解压flume,输入:cd /usr/local/flume
[root@marklin ~]# cd /usr/local/flume
[root@marklin flume]# ll
total 0
drwxr-xr-x. 7 root root 187 Apr 29 05:06 flume-1.8.0
[root@marklin flume]#
4.配置环境变量:
#Setting FLUME_HOME PATH
export FLUME_HOME=/usr/local/flume/flume-1.8.0
export PATH=${PATH}:${FLUME_HOME}/bin
5.配置flume: /usr/local/flume/flume-1.8.0/conf
[root@marklin flume]# cd /usr/local/flume/flume-1.8.0/conf
[root@marklin conf]# ll
total 20
-rw-r--r--. 1 root root 1661 Apr 29 06:18 flume-conf
-rw-r--r--. 1 root root 1661 Sep 15  2017 flume-conf.properties.template
-rw-r--r--. 1 root root 1455 Sep 15  2017 flume-env.ps1.template
-rw-r--r--. 1 root root 1568 Sep 15  2017 flume-env.sh.template
-rw-r--r--. 1 root root 3107 Sep 15  2017 log4j.properties
[root@marklin conf]# cp flume-conf.properties.template flume-conf.properties
进入flume的conf目录下,其对三大核心组件的配置如下:cd /usr/local/flume/flume-1.8.0/conf
【1】配置source:vim  flume-conf.properties
#定义agent名, source、channel、sink的名称
agent.sources = masterSequence
agent.channels = masterChannel
agent.sinks = masterSink
【2】配置source组件:masterSequence
#定义具体的source:masterSequence
agent.sources.masterSequence.type = seq
agent.sources.masterSequence.sequence = /usr/local/flume/repository/logs
agent.sources.masterSequence.channels = masterChannel
agent.sources.masterSequence.fileHeader = true
agent.sources.masterSequence.interceptors = masterInterceptor
agent.sources.masterSequence.interceptors.masterInterceptor.type = org.apache.flume.interceptor.TimestampInterceptor$Builder
【3】配置channels组件:masterChannel
#定义具体的channels组件:masterChannel
agent.channels.masterChannel.type = memory
agent.channels.masterChannel.capacity = 10000  
agent.channels.masterChannel.transactionCapacity = 100
【4】配置sinks组件:masterSink
#定义具体的sinks组件:masterSink
agent.sinks.masterSink.type = hdfs
agent.sinks.masterSink.hdfs.useLocalTimeStamp=true
agent.sinks.masterSink.hdfs.path=hdfs://marklin.com:9000/flume/%Y-%m-%d
agent.sinks.masterSink.hdfs.filePrefix = events-  
agent.sinks.masterSink.hdfs.fileType = DataStream
agent.sinks.masterSink.hdfs.minBlockReplicas=1
agent.sinks.masterSink.hdfs.rollCount = 0    
agent.sinks.masterSink.hdfs.rollSize = 134217728
agent.sinks.masterSink.hdfs.rollInterval = 60
agent.sinks.masterSink.channel = masterChannel
【5】 修改配置flume-env.sh:cp flume-env.sh.template flume-env.sh
[root@marklin ~]# cd /usr/local/flume/flume-1.8.0/conf
[root@marklin conf]# ll
total 24
-rwxr-xr-x. 1 root root 2800 Apr 29 08:03 flume-conf.properties
-rw-r--r--. 1 root root 1661 Sep 15  2017 flume-conf.properties.template
-rw-r--r--. 1 root root 1455 Sep 15  2017 flume-env.ps1.template
-rwxr-xr-x. 1 root root 1875 Apr 29 07:32 flume-env.sh
-rw-r--r--. 1 root root 1568 Sep 15  2017 flume-env.sh.template
-rw-r--r--. 1 root root 3107 Sep 15  2017 log4j.properties
[root@marklin conf]# cp flume-env.sh.template flume-env.sh
授权文件:chmod +x flume-env.sh
[root@marklin conf]# chmod +x flume-env.sh
[root@marklin conf]# ll
total 24
-rwxr-xr-x. 1 root root 2800 Apr 29 08:03 flume-conf.properties
-rw-r--r--. 1 root root 1661 Sep 15  2017 flume-conf.properties.template
-rw-r--r--. 1 root root 1455 Sep 15  2017 flume-env.ps1.template
-rwxr-xr-x. 1 root root 1875 Apr 29 07:32 flume-env.sh
-rw-r--r--. 1 root root 1568 Sep 15  2017 flume-env.sh.template
-rw-r--r--. 1 root root 3107 Sep 15  2017 log4j.properties
[root@marklin conf]#
 
【6】拷贝flume依赖的hadoopjar包到$FLUME_HOME/lib:
scp $HADOOP_HOME/share/hadoop/common/hadoop-common-2.7.5.jar                  $FLUME_HOME/lib/
scp $HADOOP_HOME/share/hadoop/common/lib/hadoop-auth-2.7.5jar                     $FLUME_HOME/lib/
scp $HADOOP_HOME/share/hadoop/common/lib/commons-configuration-1.6.jar       $FLUME_HOME/lib/
 
利用xftp5工具上传到:/usr/local/flume/flume-1.8.0/lib
 
【7】编写flume启动脚本:vim start-flume.sh
[root@marklin conf]# cd /usr/local/flume/flume-1.8.0/bin
[root@marklin bin]# ll
total 40
-rwxr-xr-x. 1 root root 12387 Sep 15  2017 flume-ng
-rw-r--r--. 1 root root   936 Sep 15  2017 flume-ng.cmd
-rwxr-xr-x. 1 root root 14176 Sep 15  2017 flume-ng.ps1
-rwxr-xr-x. 1 root root   124 Apr 29 07:33 start-flume.sh
[root@marklin bin]# vim start-flume.sh
脚本内容如下:
$FLUME_HOME/bin/flume-ng agent -n agent -c conf -f $FLUME_HOME/conf/flume-conf.properties -Dflume.root.logger=INFO,console
 
启动测试:start-flume.sh
[root@marklin bin]# start-flume.sh
Info: Including Hadoop libraries found via (/usr/local/hadoop/hadoop-2.7.5/bin/hadoop) for HDFS access
Info: Including HBASE libraries found via (/usr/local/hbase/hbase-2.0.0/bin/hbase) for HBASE access
Error: Could not find or load main class org.apache.flume.tools.GetJavaProperty
Info: Including Hive libraries found via (/usr/local/hive/hive-2.3.3) for Hive access
+ exec /usr/local/java/jdk1.8.0_162/bin/java -Xmx20m -Dflume.root.logger=INFO,console -cp 'conf:/usr/local/flume/flume-1.8.0/lib/*:/usr/local/hadoop/hadoop-2.7.5/etc/hadoop:/usr/local/hadoop/hadoop-2.7.5/share/hadoop/common/lib/*:/usr/local/hadoop/hadoop-2.7.5/share/hadoop/common/*:/usr/local/hadoop/hadoop-2.7.5/share/hadoop/hdfs:/usr/local/hadoop/hadoop-2.7.5/share/hadoop/hdfs/lib/*:/usr/local/hadoop/hadoop-2.7.5/share/hadoop/hdfs/*:/usr/local/hadoop/hadoop-2.7.5/share/hadoop/yarn/lib/*:/usr/local/hadoop/hadoop-2.7.5/share/hadoop/yarn/*:/usr/local/hadoop/hadoop-2.7.5/share/hadoop/mapreduce/lib/*:/usr/local/hadoop/hadoop-2.7.5/share/hadoop/mapreduce/*:/usr/local/hadoop/hadoop-2.7.5/contrib/capacity-scheduler/*.jar:/usr/local/hbase/hbase-2.0.0/conf:/usr/local/java/jdk1.8.0_162/lib/tools.jar:/usr/local/hbase/hbase-2.0.0:/usr/local/hbase/hbase-2.0.0/lib/aopalliance-1.0.jar:/usr/local/hbase/hbase-2.0.0/lib/aopalliance-repackaged-2.5.0-b32.jar:/usr/local/hbase/hbase-2.0.0/lib/apacheds-i18n-2.0.0-M15.jar:/usr/local/hbase/hbase-2.0.0/lib/apacheds-kerberos-codec-2.0.0-M15.jar:/usr/local/hbase/hbase-2.0.0/lib/api-asn1-api-1.0.0-M20.jar:/usr/local/hbase/hbase-2.0.0/lib/api-util-1.0.0-M20.jar:/usr/local/hbase/hbase-2.0.0/lib/asm-3.1.jar:/usr/local/hbase/hbase-2.0.0/lib/audience-annotations-0.5.0.jar:/usr/local/hbase/hbase-2.0.0/lib/avro-1.7.7.jar:/usr/local/hbase/hbase-2.0.0/lib/aws-java-sdk-1.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/commons-beanutils-core-1.8.0.jar:/usr/local/hbase/hbase-2.0.0/lib/commons-cli-1.4.jar:/usr/local/hbase/hbase-2.0.0/lib/commons-codec-1.10.jar:/usr/local/hbase/hbase-2.0.0/lib/commons-collections-3.2.2.jar:/usr/local/hbase/hbase-2.0.0/lib/commons-collections4-4.1.jar:/usr/local/hbase/hbase-2.0.0/lib/commons-compress-1.4.1.jar:/usr/local/hbase/hbase-2.0.0/lib/commons-configuration-1.6.jar:/usr/local/hbase/hbase-2.0.0/lib/commons-crypto-1.0.0.jar:/usr/local/hbase/hbase-2.0.0/lib/commons-daemon-1.0.13.jar:/usr/local/hbase/hbase-2.0.0/lib/commons-digester-1.8.jar:/usr/local/hbase/hbase-2.0.0/lib/commons-httpclient-3.1.jar:/usr/local/hbase/hbase-2.0.0/lib/commons-io-2.5.jar:/usr/local/hbase/hbase-2.0.0/lib/commons-lang-2.6.jar:/usr/local/hbase/hbase-2.0.0/lib/commons-lang3-3.6.jar:/usr/local/hbase/hbase-2.0.0/lib/commons-logging-1.2.jar:/usr/local/hbase/hbase-2.0.0/lib/commons-math3-3.6.1.jar:/usr/local/hbase/hbase-2.0.0/lib/commons-net-3.1.jar:/usr/local/hbase/hbase-2.0.0/lib/curator-client-4.0.0.jar:/usr/local/hbase/hbase-2.0.0/lib/curator-framework-4.0.0.jar:/usr/local/hbase/hbase-2.0.0/lib/curator-recipes-4.0.0.jar:/usr/local/hbase/hbase-2.0.0/lib/disruptor-3.3.6.jar:/usr/local/hbase/hbase-2.0.0/lib/findbugs-annotations-1.3.9-1.jar:/usr/local/hbase/hbase-2.0.0/lib/gson-2.2.4.jar:/usr/local/hbase/hbase-2.0.0/lib/guava-11.0.2.jar:/usr/local/hbase/hbase-2.0.0/lib/guice-3.0.jar:/usr/local/hbase/hbase-2.0.0/lib/guice-servlet-3.0.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-annotations-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-auth-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-client-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-common-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-common-2.7.4-tests.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-distcp-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-hdfs-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-hdfs-2.7.4-tests.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-mapreduce-client-app-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-mapreduce-client-common-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-mapreduce-client-core-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-mapreduce-client-hs-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-mapreduce-client-jobclient-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-mapreduce-client-shuffle-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-minicluster-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-yarn-api-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-yarn-client-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-yarn-common-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-yarn-server-applicationhistoryservice-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-yarn-server-common-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-yarn-server-nodemanager-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-yarn-server-resourcemanager-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-yarn-server-tests-2.7.4-tests.jar:/usr/local/hbase/hbase-2.0.0/lib/hadoop-yarn-server-web-proxy-2.7.4.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-annotations-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-annotations-2.0.0-beta-2-tests.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-client-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-common-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-common-2.0.0-beta-2-tests.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-endpoint-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-examples-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-external-blockcache-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-hadoop2-compat-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-hadoop2-compat-2.0.0-beta-2-tests.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-hadoop-compat-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-hadoop-compat-2.0.0-beta-2-tests.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-http-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-it-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-it-2.0.0-beta-2-tests.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-mapreduce-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-mapreduce-2.0.0-beta-2-tests.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-metrics-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-metrics-api-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-procedure-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-protocol-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-protocol-shaded-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-replication-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-resource-bundle-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-rest-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-rsgroup-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-rsgroup-2.0.0-beta-2-tests.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-server-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-server-2.0.0-beta-2-tests.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-shaded-miscellaneous-2.0.0.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-shaded-netty-2.0.0.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-shaded-protobuf-2.0.0.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-shell-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-testing-util-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-thrift-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-zookeeper-2.0.0-beta-2.jar:/usr/local/hbase/hbase-2.0.0/lib/hbase-zookeeper-2.0.0-beta-2-tests.jar:/usr/local/hbase/hbase-2.0.0/lib/hk2-api-2.5.0-b32.jar:/usr/local/hbase/hbase-2.0.0/lib/hk2-locator-2.5.0-b32.jar:/usr/local/hbase/hbase-2.0.0/lib/hk2-utils-2.5.0-b32.jar:/usr/local/hbase/hbase-2.0.0/lib/htrace-core-3.2.0-incubating.jar:/usr/local/hbase/hbase-2.0.0/lib/htrace-core4-4.2.0-incubating.jar:/usr/local/hbase/hbase-2.0.0/lib/httpclient-4.5.3.jar:/usr/local/hbase/hbase-2.0.0/lib/httpcore-4.4.6.jar:/usr/local/hbase/hbase-2.0.0/lib/jackson-annotations-2.9.0.jar:/usr/local/hbase/hbase-2.0.0/lib/jackson-core-2.9.2.jar:/usr/local/hbase/hbase-2.0.0/lib/jackson-core-asl-1.9.13.jar:/usr/local/hbase/hbase-2.0.0/lib/jackson-databind-2.9.2.jar:/usr/local/hbase/hbase-2.0.0/lib/jackson-jaxrs-1.8.3.jar:/usr/local/hbase/hbase-2.0.0/lib/jackson-jaxrs-base-2.9.2.jar:/usr/local/hbase/hbase-2.0.0/lib/jackson-jaxrs-json-provider-2.9.2.jar:/usr/local/hbase/hbase-2.0.0/lib/jackson-mapper-asl-1.9.13.jar:/usr/local/hbase/hbase-2.0.0/lib/jackson-module-jaxb-annotations-2.9.2.jar:/usr/local/hbase/hbase-2.0.0/lib/jackson-xc-1.8.3.jar:/usr/local/hbase/hbase-2.0.0/lib/jamon-runtime-2.4.1.jar:/usr/local/hbase/hbase-2.0.0/lib/javassist-3.20.0-GA.jar:/usr/local/hbase/hbase-2.0.0/lib/javax.annotation-api-1.2.jar:/usr/local/hbase/hbase-2.0.0/lib/javax.el-3.0.1-b08.jar:/usr/local/hbase/hbase-2.0.0/lib/javax.inject-2.5.0-b32.jar:/usr/local/hbase/hbase-2.0.0/lib/java-xmlbuilder-0.4.jar:/usr/local/hbase/hbase-2.0.0/lib/javax.servlet-api-3.1.0.jar:/usr/local/hbase/hbase-2.0.0/lib/javax.servlet.jsp-2.3.2.jar:/usr/local/hbase/hbase-2.0.0/lib/javax.servlet.jsp-api-2.3.1.jar:/usr/local/hbase/hbase-2.0.0/lib/javax.servlet.jsp.jstl-1.2.0.v201105211821.jar:/usr/local/hbase/hbase-2.0.0/lib/javax.servlet.jsp.jstl-1.2.2.jar:/usr/local/hbase/hbase-2.0.0/lib/javax.ws.rs-api-2.0.1.jar:/usr/local/hbase/hbase-2.0.0/lib/jaxb-api-2.2.12.jar:/usr/local/hbase/hbase-2.0.0/lib/jaxb-impl-2.2.3-1.jar:/usr/local/hbase/hbase-2.0.0/lib/jcodings-1.0.18.jar:/usr/local/hbase/hbase-2.0.0/lib/jersey-client-2.25.1.jar:/usr/local/hbase/hbase-2.0.0/lib/jersey-common-2.25.1.jar:/usr/local/hbase/hbase-2.0.0/lib/jersey-container-servlet-core-2.25.1.jar:/usr/local/hbase/hbase-2.0.0/lib/jersey-guava-2.25.1.jar:/usr/local/hbase/hbase-2.0.0/lib/jersey-media-jaxb-2.25.1.jar:/usr/local/hbase/hbase-2.0.0/lib/jersey-server-2.25.1.jar:/usr/local/hbase/hbase-2.0.0/lib/jets3t-0.9.0.jar:/usr/local/hbase/hbase-2.0.0/lib/jettison-1.3.8.jar:/usr/local/hbase/hbase-2.0.0/lib/jetty-6.1.26.jar:/usr/local/hbase/hbase-2.0.0/lib/jetty-http-9.3.19.v20170502.jar:/usr/local/hbase/hbase-2.0.0/lib/jetty-io-9.3.19.v20170502.jar:/usr/local/hbase/hbase-2.0.0/lib/jetty-jmx-9.3.19.v20170502.jar:/usr/local/hbase/hbase-2.0.0/lib/jetty-jsp-9.2.19.v20160908.jar:/usr/local/hbase/hbase-2.0.0/lib/jetty-schemas-3.1.M0.jar:/usr/local/hbase/hbase-2.0.0/lib/jetty-security-9.3.19.v20170502.jar:/usr/local/hbase/hbase-2.0.0/lib/jetty-server-9.3.19.v20170502.jar:/usr/local/hbase/hbase-2.0.0/lib/jetty-servlet-9.3.19.v20170502.jar:/usr/local/hbase/hbase-2.0.0/lib/jetty-sslengine-6.1.26.jar:/usr/local/hbase/hbase-2.0.0/lib/jetty-util-6.1.26.jar:/usr/local/hbase/hbase-2.0.0/lib/jetty-util-9.3.19.v20170502.jar:/usr/local/hbase/hbase-2.0.0/lib/jetty-util-ajax-9.3.19.v20170502.jar:/usr/local/hbase/hbase-2.0.0/lib/jetty-webapp-9.3.19.v20170502.jar:/usr/local/hbase/hbase-2.0.0/lib/jetty-xml-9.3.19.v20170502.jar:/usr/local/hbase/hbase-2.0.0/lib/joni-2.1.11.jar:/usr/local/hbase/hbase-2.0.0/lib/jsch-0.1.54.jar:/usr/local/hbase/hbase-2.0.0/lib/junit-4.12.jar:/usr/local/hbase/hbase-2.0.0/lib/leveldbjni-all-1.8.jar:/usr/local/hbase/hbase-2.0.0/lib/libthrift-0.9.3.jar:/usr/local/hbase/hbase-2.0.0/lib/log4j-1.2.17.jar:/usr/local/hbase/hbase-2.0.0/lib/metrics-core-3.2.1.jar:/usr/local/hbase/hbase-2.0.0/lib/netty-all-4.0.23.Final.jar:/usr/local/hbase/hbase-2.0.0/lib/org.eclipse.jdt.core-3.8.2.v20130121.jar:/usr/local/hbase/hbase-2.0.0/lib/osgi-resource-locator-1.0.1.jar:/usr/local/hbase/hbase-2.0.0/lib/paranamer-2.3.jar:/usr/local/hbase/hbase-2.0.0/lib/protobuf-java-2.5.0.jar:/usr/local/hbase/hbase-2.0.0/lib/slf4j-api-1.7.25.jar:/usr/local/hbase/hbase-2.0.0/lib/snappy-java-1.0.5.jar:/usr/local/hbase/hbase-2.0.0/lib/spymemcached-2.12.2.jar:/usr/local/hbase/hbase-2.0.0/lib/validation-api-1.1.0.Final.jar:/usr/local/hbase/hbase-2.0.0/lib/xmlenc-0.52.jar:/usr/local/hbase/hbase-2.0.0/lib/xz-1.0.jar:/usr/local/hbase/hbase-2.0.0/lib/zookeeper-3.4.10.jar:/usr/local/hadoop/hadoop-2.7.5/etc/hadoop:/usr/local/hadoop/hadoop-2.7.5/share/hadoop/common/lib/*:/usr/local/hadoop/hadoop-2.7.5/share/hadoop/common/*:/usr/local/hadoop/hadoop-2.7.5/share/hadoop/hdfs:/usr/local/hadoop/hadoop-2.7.5/share/hadoop/hdfs/lib/*:/usr/local/hadoop/hadoop-2.7.5/share/hadoop/hdfs/*:/usr/local/hadoop/hadoop-2.7.5/share/hadoop/yarn/lib/*:/usr/local/hadoop/hadoop-2.7.5/share/hadoop/yarn/*:/usr/local/hadoop/hadoop-2.7.5/share/hadoop/mapreduce/lib/*:/usr/local/hadoop/hadoop-2.7.5/share/hadoop/mapreduce/*:/usr/local/hadoop/hadoop-2.7.5/contrib/capacity-scheduler/*.jar:/usr/local/hbase/hbase-2.0.0/conf:/usr/local/hbase/hbase-2.0.0/conf:/usr/local/hive/hive-2.3.3/lib/*' -Djava.library.path=:/usr/local/hadoop/hadoop-2.7.5/lib org.apache.flume.node.Application -n agent -f /usr/local/flume/flume-1.8.0/conf/flume-conf.properties
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/flume/flume-1.8.0/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hadoop/hadoop-2.7.5/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
18/04/29 08:34:01 INFO node.PollingPropertiesFileConfigurationProvider: Configuration provider starting
18/04/29 08:34:01 INFO node.PollingPropertiesFileConfigurationProvider: Reloading configuration file:/usr/local/flume/flume-1.8.0/conf/flume-conf.properties
18/04/29 08:34:01 INFO conf.FlumeConfiguration: Processing:masterSink
18/04/29 08:34:01 INFO conf.FlumeConfiguration: Processing:masterSink
18/04/29 08:34:01 INFO conf.FlumeConfiguration: Processing:masterSink
18/04/29 08:34:01 INFO conf.FlumeConfiguration: Processing:masterSink
18/04/29 08:34:01 INFO conf.FlumeConfiguration: Processing:masterSink
18/04/29 08:34:01 INFO conf.FlumeConfiguration: Processing:masterSink
18/04/29 08:34:01 INFO conf.FlumeConfiguration: Processing:masterSink
18/04/29 08:34:01 INFO conf.FlumeConfiguration: Processing:masterSink
18/04/29 08:34:01 INFO conf.FlumeConfiguration: Added sinks: masterSink Agent: agent
18/04/29 08:34:01 INFO conf.FlumeConfiguration: Processing:masterSink
18/04/29 08:34:01 INFO conf.FlumeConfiguration: Processing:masterSink
18/04/29 08:34:01 INFO conf.FlumeConfiguration: Post-validation flume configuration contains configuration for agents: [agent]
18/04/29 08:34:01 INFO node.AbstractConfigurationProvider: Creating channels
18/04/29 08:34:01 INFO channel.DefaultChannelFactory: Creating instance of channel masterChannel type memory
18/04/29 08:34:01 INFO node.AbstractConfigurationProvider: Created channel masterChannel
18/04/29 08:34:01 INFO source.DefaultSourceFactory: Creating instance of source masterSequence, type seq
18/04/29 08:34:01 INFO sink.DefaultSinkFactory: Creating instance of sink: masterSink, type: hdfs
18/04/29 08:34:01 INFO node.AbstractConfigurationProvider: Channel masterChannel connected to [masterSequence, masterSink]
18/04/29 08:34:01 INFO node.Application: Starting new configuration:{ sourceRunners:{masterSequence=PollableSourceRunner: { source:org.apache.flume.source.SequenceGeneratorSource{name:masterSequence,state:IDLE} counterGroup:{ name:null counters:{} } }} sinkRunners:{masterSink=SinkRunner: { policy:org.apache.flume.sink.DefaultSinkProcessor@18460e78 counterGroup:{ name:null counters:{} } }} channels:{masterChannel=org.apache.flume.channel.MemoryChannel{name: masterChannel}} }
18/04/29 08:34:01 INFO node.Application: Starting Channel masterChannel
18/04/29 08:34:01 INFO instrumentation.MonitoredCounterGroup: Monitored counter group for type: CHANNEL, name: masterChannel: Successfully registered new MBean.
18/04/29 08:34:01 INFO instrumentation.MonitoredCounterGroup: Component type: CHANNEL, name: masterChannel started
18/04/29 08:34:01 INFO node.Application: Starting Sink masterSink
18/04/29 08:34:01 INFO node.Application: Starting Source masterSequence
18/04/29 08:34:01 INFO source.SequenceGeneratorSource: Sequence generator source do starting
18/04/29 08:34:01 INFO instrumentation.MonitoredCounterGroup: Monitored counter group for type: SOURCE, name: masterSequence: Successfully registered new MBean.
18/04/29 08:34:01 INFO instrumentation.MonitoredCounterGroup: Component type: SOURCE, name: masterSequence started
18/04/29 08:34:01 INFO instrumentation.MonitoredCounterGroup: Monitored counter group for type: SINK, name: masterSink: Successfully registered new MBean.
18/04/29 08:34:01 INFO instrumentation.MonitoredCounterGroup: Component type: SINK, name: masterSink started
18/04/29 08:34:01 INFO hdfs.HDFSDataStream: Serializer = TEXT, UseRawLocalFileSystem = false
18/04/29 08:34:02 INFO hdfs.BucketWriter: Creating hdfs://marklin.com:9000/flume/2018-04-29/events-.1525005241845.tmp
浏览器输入:http://192.168.3.4:50070/explorer.html#/flume
 
相关标签: 大数据 flume