衡水手机网站建设公司,网站分析内容,网络运营推广怎么做,网站建设平台用乐云践新flume最主要的作用就是实时读取服务器本地磁盘的数据#xff0c;将数据写入到hdfs中架构#xff1a;开始安装一#xff0c;上传压缩包#xff0c;解压并更名解压#xff1a;[rootsiwen install]# tar -zxf apache-flume-1.9.0-bin.tar.gz -C ../soft/[rootsiwen install]#…flume最主要的作用就是实时读取服务器本地磁盘的数据将数据写入到hdfs中架构开始安装一上传压缩包解压并更名解压[rootsiwen install]# tar -zxf apache-flume-1.9.0-bin.tar.gz -C ../soft/[rootsiwen install]# cd ../soft/更名[rootsiwen soft]# mv apache-flume-1.9.0-bin/ flume190二修改配置文件1flume-env.sh文件[rootsiwen soft]# cd ./flume190/conf/复制flume-env.sh文件[rootsiwen conf]# cp flume-env.sh.template flume-env.sh[rootsiwen conf]# vim ./flume-env.shexport JAVA_OPTS-Xms1000m -Xmx2000m -Dcom.sun.management.jmxremote export JAVA_HOME/opt/soft/jdk1802netcat-logger.conf文件[rootsiwen conf]# vim ./netcat-logger.conf# Name the components on this agent a1表示agent的名称a1.sourcesr1 #r1表示a1的source名称a1.sinksk1 #k1表示a1的sink名称a1.channelsc1 #c1表示a1的channel名称# configure the sourcea1.sources.r1.typenetcat #表示a1的输入源类型为netcat端口类型a1.sources.r1.bindlocalhost #表示a1的监听的主机a1.sources.r1.port8888 #表示a1的监听的端口号# Use a channel which buffers events in memorya1.channels.c1.typememory # 表示示a1的channel类型是memory内存型a1.channels.c1.capacity1000 # 表示a1的channel总容量1000个eventa1.channels.c1.transactionCapacity100 # 表示a1的channel传输时收集到了100条event以后再去提交事务# Describe sinka1.sinks.k1.typeloggera1.sources.r1.channelsc1 #表示将r1和c1连接起来a1.sinks.k1.channelc1 #表示将k1和c1连接起来三下载工具//下载netcat[rootsiwen conf]# yum install -y nc //查看telnet [rootsiwen conf]# yumlist telnet.*//安装telnet[rootsiwen conf]# yum install telnet-server[rootsiwen conf]# yum install telnet.*四启动启动的命令[rootsiwen flume190]# ./bin/flume-ng agent --name a1 --conf ./conf/ --conf-file ./conf/netcat-logger.conf -Dflume.root.loggerINFO,console注意–conf/-c表示配置文件存储在 conf/目录–name/-n表示给 agent 起名为 a1–conf-file/-fflume 本次启动读取的配置文件是在 job 文件夹下的 netcat-logger.conf 文件-Dflume.root.loggerINFO,console -D 表示 flume 运行时动态修改 flume.root.logger# 重新开一个窗口 拨号发送hello[rootsiwen ~]# telnet 192.168.255.159 8888主机那边就会得到反馈