安装flume1.5
生活随笔
收集整理的這篇文章主要介紹了
安装flume1.5
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
1:下載
wget http://mirrors.hust.edu.cn/apache/flume/1.5.0/apache-flume-1.5.0-bin.tar.gz
2:解壓
[jifeng@jifeng02 ~]$ cd apache [jifeng@jifeng02 apache]$ ls apache-flume-1.5.0-bin.tar.gz chukwa-incubating-src-0.5.0.tar.gz [jifeng@jifeng02 apache]$ tar zxf apache-flume-1.5.0-bin.tar.gz3:配置環(huán)境變量
在 .bash_profile最后加上下面三行
export FLUME_HOME=$HOME/apache/apache-flume-1.5.0-bin
export FLUME_CONF_DIR=$FLUME_HOME/conf
export PATH=$PATH:$FLUME_HOME/bin
4:配置flume-env.sh文件
復(fù)制flume-env.sh.template到 flume-env.sh
[jifeng@jifeng02 apache-flume-1.5.0-bin]$ cd conf [jifeng@jifeng02 conf]$ ls flume-conf.properties.template flume-env.sh.template log4j.properties [jifeng@jifeng02 conf]$ cp flume-env.sh.template flume-env.sh [jifeng@jifeng02 conf]$ ls flume-conf.properties.template flume-env.sh flume-env.sh.template log4j.properties修改JAVA_HOME和JAVA_OPTS [jifeng@jifeng02 conf]$ vi flume-env.sh# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License.# If this file is placed at FLUME_CONF_DIR/flume-env.sh, it will be sourced # during Flume startup.# Enviroment variables can be set here.JAVA_HOME=/home/jifeng/jdk1.7.0_45# Give Flume more memory and pre-allocate, enable remote monitoring via JMX JAVA_OPTS="-Xms100m -Xmx200m -Dcom.sun.management.jmxremote"# Note that the Flume conf directory is always included in the classpath. #FLUME_CLASSPATH=""~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "flume-env.sh" 29L, 1196C 已寫入5:測試運行
在conf目錄創(chuàng)建example.conf
[jifeng@jifeng02 conf]$ vi example.conf內(nèi)容: # example.conf: A single-node Flume configuration# Name the components on this agent a1.sources = r1 a1.sinks = k1 a1.channels = c1# Describe/configure the source a1.sources.r1.type = netcat a1.sources.r1.bind = localhost a1.sources.r1.port = 44444# Describe the sink a1.sinks.k1.type = logger# Use a channel which buffers events in memory a1.channels.c1.type = memory a1.channels.c1.capacity = 1000 a1.channels.c1.transactionCapacity = 100# Bind the source and sink to the channel a1.sources.r1.channels = c1 a1.sinks.k1.channel = c1運行:?bin/flume-ng agent --conf ./conf --conf-file ./conf/example.conf --name a1 -Dflume.root.logger=INFO,console [jifeng@jifeng02 apache-flume-1.5.0-bin]$ bin/flume-ng agent --conf ./conf --conf-file ./conf/example.conf --name a1 -Dflume.root.logger=INFO,console Info: Sourcing environment configuration script /home/jifeng/apache/apache-flume-1.5.0-bin/conf/flume-env.sh Info: Including Hadoop libraries found via (/home/jifeng/hadoop/hadoop-1.2.1/bin/hadoop) for HDFS access Warning: $HADOOP_HOME is deprecated.Warning: $HADOOP_HOME is deprecated.Info: Excluding /home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/slf4j-api-1.4.3.jar from classpath Info: Excluding /home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/slf4j-log4j12-1.4.3.jar from classpath Info: Including HBASE libraries found via (/home/jifeng/hbase-0.94.21/bin/hbase) for HBASE access 錯誤: 找不到或無法加載主類 org.apache.flume.tools.GetJavaProperty Info: Excluding /home/jifeng/hbase-0.94.21/lib/slf4j-api-1.4.3.jar from classpath Info: Excluding /home/jifeng/hbase-0.94.21/lib/slf4j-log4j12-1.4.3.jar from classpath Info: Excluding /home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/slf4j-api-1.4.3.jar from classpath Info: Excluding /home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/slf4j-log4j12-1.4.3.jar from classpath + exec /home/jifeng/jdk1.7.0_45/bin/java -Xms100m -Xmx200m -Dcom.sun.management.jmxremote -Dflume.root.logger=INFO,console -cp '/home/jifeng/apache/apache-flume-1.5.0-bin/conf:/home/jifeng/apache/apache-flume-1.5.0-bin/lib/*:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../conf:/home/jifeng/jdk1.7.0_45/lib/tools.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/..:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../hadoop-core-1.2.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/asm-3.2.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/aspectjrt-1.6.11.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/aspectjtools-1.6.11.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-beanutils-1.7.0.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-beanutils-core-1.8.0.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-cli-1.2.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-codec-1.4.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-collections-3.2.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-configuration-1.6.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-daemon-1.0.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-digester-1.8.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-el-1.0.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-httpclient-3.0.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-io-2.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-lang-2.4.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-logging-1.1.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-logging-api-1.0.4.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-math-2.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-net-3.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/core-3.1.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/hadoop-capacity-scheduler-1.2.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/hadoop-fairscheduler-1.2.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/hadoop-thriftfs-1.2.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/hsqldb-1.8.0.10.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jackson-core-asl-1.8.8.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jackson-mapper-asl-1.8.8.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jasper-compiler-5.5.12.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jasper-runtime-5.5.12.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jdeb-0.8.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jersey-core-1.8.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jersey-json-1.8.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jersey-server-1.8.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jets3t-0.6.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jetty-6.1.26.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jetty-util-6.1.26.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jsch-0.1.42.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/junit-4.5.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/kfs-0.2.2.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/log4j-1.2.15.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/mockito-all-1.8.5.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/oro-2.0.8.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/servlet-api-2.5-20081211.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/xmlenc-0.52.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jsp-2.1/jsp-2.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jsp-2.1/jsp-api-2.1.jar:/home/jifeng/hbase-0.94.21/conf:/home/jifeng/jdk1.7.0_45/lib/tools.jar:/home/jifeng/hbase-0.94.21:/home/jifeng/hbase-0.94.21/hbase-0.94.21.jar:/home/jifeng/hbase-0.94.21/hbase-0.94.21-tests.jar:/home/jifeng/hbase-0.94.21/lib/activation-1.1.jar:/home/jifeng/hbase-0.94.21/lib/asm-3.1.jar:/home/jifeng/hbase-0.94.21/lib/avro-1.5.3.jar:/home/jifeng/hbase-0.94.21/lib/avro-ipc-1.5.3.jar:/home/jifeng/hbase-0.94.21/lib/commons-beanutils-1.7.0.jar:/home/jifeng/hbase-0.94.21/lib/commons-beanutils-core-1.8.0.jar:/home/jifeng/hbase-0.94.21/lib/commons-cli-1.2.jar:/home/jifeng/hbase-0.94.21/lib/commons-codec-1.4.jar:/home/jifeng/hbase-0.94.21/lib/commons-collections-3.2.1.jar:/home/jifeng/hbase-0.94.21/lib/commons-configuration-1.6.jar:/home/jifeng/hbase-0.94.21/lib/commons-digester-1.8.jar:/home/jifeng/hbase-0.94.21/lib/commons-el-1.0.jar:/home/jifeng/hbase-0.94.21/lib/commons-httpclient-3.1.jar:/home/jifeng/hbase-0.94.21/lib/commons-io-2.1.jar:/home/jifeng/hbase-0.94.21/lib/commons-lang-2.5.jar:/home/jifeng/hbase-0.94.21/lib/commons-logging-1.1.1.jar:/home/jifeng/hbase-0.94.21/lib/commons-math-2.1.jar:/home/jifeng/hbase-0.94.21/lib/commons-net-1.4.1.jar:/home/jifeng/hbase-0.94.21/lib/core-3.1.1.jar:/home/jifeng/hbase-0.94.21/lib/guava-11.0.2.jar:/home/jifeng/hbase-0.94.21/lib/hadoop-core-1.2.1.jar:/home/jifeng/hbase-0.94.21/lib/hamcrest-core-1.3.jar:/home/jifeng/hbase-0.94.21/lib/high-scale-lib-1.1.1.jar:/home/jifeng/hbase-0.94.21/lib/httpclient-4.1.2.jar:/home/jifeng/hbase-0.94.21/lib/httpcore-4.1.3.jar:/home/jifeng/hbase-0.94.21/lib/jackson-core-asl-1.8.8.jar:/home/jifeng/hbase-0.94.21/lib/jackson-jaxrs-1.8.8.jar:/home/jifeng/hbase-0.94.21/lib/jackson-mapper-asl-1.8.8.jar:/home/jifeng/hbase-0.94.21/lib/jackson-xc-1.8.8.jar:/home/jifeng/hbase-0.94.21/lib/jamon-runtime-2.3.1.jar:/home/jifeng/hbase-0.94.21/lib/jasper-compiler-5.5.23.jar:/home/jifeng/hbase-0.94.21/lib/jasper-runtime-5.5.23.jar:/home/jifeng/hbase-0.94.21/lib/jaxb-api-2.1.jar:/home/jifeng/hbase-0.94.21/lib/jaxb-impl-2.2.3-1.jar:/home/jifeng/hbase-0.94.21/lib/jersey-core-1.8.jar:/home/jifeng/hbase-0.94.21/lib/jersey-json-1.8.jar:/home/jifeng/hbase-0.94.21/lib/jersey-server-1.8.jar:/home/jifeng/hbase-0.94.21/lib/jettison-1.1.jar:/home/jifeng/hbase-0.94.21/lib/jetty-6.1.26.jar:/home/jifeng/hbase-0.94.21/lib/jetty-util-6.1.26.jar:/home/jifeng/hbase-0.94.21/lib/jruby-complete-1.6.5.jar:/home/jifeng/hbase-0.94.21/lib/jsp-2.1-6.1.14.jar:/home/jifeng/hbase-0.94.21/lib/jsp-api-2.1-6.1.14.jar:/home/jifeng/hbase-0.94.21/lib/jsr305-1.3.9.jar:/home/jifeng/hbase-0.94.21/lib/junit-4.11.jar:/home/jifeng/hbase-0.94.21/lib/libthrift-0.8.0.jar:/home/jifeng/hbase-0.94.21/lib/log4j-1.2.16.jar:/home/jifeng/hbase-0.94.21/lib/metrics-core-2.1.2.jar:/home/jifeng/hbase-0.94.21/lib/netty-3.2.4.Final.jar:/home/jifeng/hbase-0.94.21/lib/phoenix-core-3.1.0.jar:/home/jifeng/hbase-0.94.21/lib/protobuf-java-2.4.0a.jar:/home/jifeng/hbase-0.94.21/lib/servlet-api-2.5-6.1.14.jar:/home/jifeng/hbase-0.94.21/lib/snappy-java-1.0.3.2.jar:/home/jifeng/hbase-0.94.21/lib/stax-api-1.0.1.jar:/home/jifeng/hbase-0.94.21/lib/velocity-1.7.jar:/home/jifeng/hbase-0.94.21/lib/xmlenc-0.52.jar:/home/jifeng/hbase-0.94.21/lib/zookeeper-3.4.5.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../conf:/home/jifeng/jdk1.7.0_45/lib/tools.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/..:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../hadoop-core-1.2.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/asm-3.2.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/aspectjrt-1.6.11.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/aspectjtools-1.6.11.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-beanutils-1.7.0.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-beanutils-core-1.8.0.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-cli-1.2.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-codec-1.4.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-collections-3.2.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-configuration-1.6.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-daemon-1.0.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-digester-1.8.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-el-1.0.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-httpclient-3.0.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-io-2.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-lang-2.4.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-logging-1.1.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-logging-api-1.0.4.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-math-2.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/commons-net-3.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/core-3.1.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/hadoop-capacity-scheduler-1.2.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/hadoop-fairscheduler-1.2.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/hadoop-thriftfs-1.2.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/hsqldb-1.8.0.10.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jackson-core-asl-1.8.8.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jackson-mapper-asl-1.8.8.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jasper-compiler-5.5.12.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jasper-runtime-5.5.12.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jdeb-0.8.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jersey-core-1.8.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jersey-json-1.8.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jersey-server-1.8.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jets3t-0.6.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jetty-6.1.26.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jetty-util-6.1.26.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jsch-0.1.42.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/junit-4.5.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/kfs-0.2.2.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/log4j-1.2.15.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/mockito-all-1.8.5.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/oro-2.0.8.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/servlet-api-2.5-20081211.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/xmlenc-0.52.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jsp-2.1/jsp-2.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/jsp-2.1/jsp-api-2.1.jar:/home/jifeng/hadoop/hadoop-1.2.1/conf:/home/jifeng/hbase-0.94.21/conf' -Djava.library.path=:/home/jifeng/hadoop/hadoop-1.2.1/libexec/../lib/native/Linux-i386-32 org.apache.flume.node.Application --conf-file ./conf/example.conf --name a1 2014-10-20 11:49:18,703 (lifecycleSupervisor-1-0) [INFO - org.apache.flume.node.PollingPropertiesFileConfigurationProvider.start(PollingPropertiesFileConfigurationProvider.java:61)] Configuration provider starting 2014-10-20 11:49:18,707 (conf-file-poller-0) [INFO - org.apache.flume.node.PollingPropertiesFileConfigurationProvider$FileWatcherRunnable.run(PollingPropertiesFileConfigurationProvider.java:133)] Reloading configuration file:./conf/example.conf 2014-10-20 11:49:18,719 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty(FlumeConfiguration.java:930)] Added sinks: k1 Agent: a1 2014-10-20 11:49:18,719 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty(FlumeConfiguration.java:1016)] Processing:k1 2014-10-20 11:49:18,720 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration$AgentConfiguration.addProperty(FlumeConfiguration.java:1016)] Processing:k1 2014-10-20 11:49:18,737 (conf-file-poller-0) [INFO - org.apache.flume.conf.FlumeConfiguration.validateConfiguration(FlumeConfiguration.java:140)] Post-validation flume configuration contains configuration for agents: [a1] 2014-10-20 11:49:18,738 (conf-file-poller-0) [INFO - org.apache.flume.node.AbstractConfigurationProvider.loadChannels(AbstractConfigurationProvider.java:150)] Creating channels 2014-10-20 11:49:18,745 (conf-file-poller-0) [INFO - org.apache.flume.channel.DefaultChannelFactory.create(DefaultChannelFactory.java:40)] Creating instance of channel c1 type memory 2014-10-20 11:49:18,752 (conf-file-poller-0) [INFO - org.apache.flume.node.AbstractConfigurationProvider.loadChannels(AbstractConfigurationProvider.java:205)] Created channel c1 2014-10-20 11:49:18,754 (conf-file-poller-0) [INFO - org.apache.flume.source.DefaultSourceFactory.create(DefaultSourceFactory.java:39)] Creating instance of source r1, type netcat 2014-10-20 11:49:18,771 (conf-file-poller-0) [INFO - org.apache.flume.sink.DefaultSinkFactory.create(DefaultSinkFactory.java:40)] Creating instance of sink: k1, type: logger 2014-10-20 11:49:18,778 (conf-file-poller-0) [INFO - org.apache.flume.node.AbstractConfigurationProvider.getConfiguration(AbstractConfigurationProvider.java:119)] Channel c1 connected to [r1, k1] 2014-10-20 11:49:18,787 (conf-file-poller-0) [INFO - org.apache.flume.node.Application.startAllComponents(Application.java:138)] Starting new configuration:{ sourceRunners:{r1=EventDrivenSourceRunner: { source:org.apache.flume.source.NetcatSource{name:r1,state:IDLE} }} sinkRunners:{k1=SinkRunner: { policy:org.apache.flume.sink.DefaultSinkProcessor@1b8202e counterGroup:{ name:null counters:{} } }} channels:{c1=org.apache.flume.channel.MemoryChannel{name: c1}} } 2014-10-20 11:49:18,798 (conf-file-poller-0) [INFO - org.apache.flume.node.Application.startAllComponents(Application.java:145)] Starting Channel c1 2014-10-20 11:49:18,801 (lifecycleSupervisor-1-0) [INFO - org.apache.flume.instrumentation.MonitoredCounterGroup.register(MonitoredCounterGroup.java:119)] Monitored counter group for type: CHANNEL, name: c1: Successfully registered new MBean. 2014-10-20 11:49:18,801 (lifecycleSupervisor-1-0) [INFO - org.apache.flume.instrumentation.MonitoredCounterGroup.start(MonitoredCounterGroup.java:95)] Component type: CHANNEL, name: c1 started 2014-10-20 11:49:18,804 (conf-file-poller-0) [INFO - org.apache.flume.node.Application.startAllComponents(Application.java:173)] Starting Sink k1 2014-10-20 11:49:18,808 (conf-file-poller-0) [INFO - org.apache.flume.node.Application.startAllComponents(Application.java:184)] Starting Source r1 2014-10-20 11:49:18,809 (lifecycleSupervisor-1-2) [INFO - org.apache.flume.source.NetcatSource.start(NetcatSource.java:150)] Source starting 2014-10-20 11:49:18,814 (lifecycleSupervisor-1-2) [INFO - org.apache.flume.source.NetcatSource.start(NetcatSource.java:164)] Created serverSocket:sun.nio.ch.ServerSocketChannelImpl[/127.0.0.1:44444]再打開一個終端,輸入命令:telnet ?localhost 44444,輸入“hello world”:
[jifeng@jifeng02 ~]$ telnet localhost 44444 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. hello world OK
在原來的終端上查看
64)] Created serverSocket:sun.nio.ch.ServerSocketChannelImpl[/127.0.0.1:44444] 2014-10-20 14:18:37,599 (SinkRunner-PollingRunner-DefaultSinkProcessor) [INFO - org.apache.flume.sink.LoggerSink.process(LoggerSink.java:70)] Event: { headers:{} body: 68 65 6C 6C 6F 20 77 6F 72 6C 64 0D hello world. }這樣就成功部署和配置了flume的agent.
總結(jié)
以上是生活随笔為你收集整理的安装flume1.5的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: centos安装Hue 3.7.0
- 下一篇: centos 安装 telnet