############################################
# producer config
############################################
#agent section
producer.sources = s
producer.channels = c c1 c2
producer.sinks = r h es #source section
producer.sources.s.type =exec
producer.sources.s.command = tail -f /usr/local/nginx/logs/test1.log
#producer.sources.s.type = spooldir
#producer.sources.s.spoolDir = /usr/local/nginx/logs/
#producer.sources.s.fileHeader = true producer.sources.s.channels = c c1 c2 producer.sources.s.interceptors = i
#不支持忽略大小写
producer.sources.s.interceptors.i.regex = .*\.(css|js|jpg|jpeg|png|gif|ico).*
producer.sources.s.interceptors.i.type = org.apache.flume.interceptor.RegexFilteringInterceptor$Builder
#不包含
producer.sources.s.interceptors.i.excludeEvents = true ############################################
# hdfs config
############################################
producer.channels.c.type = memory
#Timeout in seconds for adding or removing an event
producer.channels.c.keep-alive= 30
producer.channels.c.capacity = 10000
producer.channels.c.transactionCapacity = 10000
producer.channels.c.byteCapacityBufferPercentage = 20
producer.channels.c.byteCapacity = 800000 producer.sinks.r.channel = c producer.sinks.r.type = avro
producer.sinks.r.hostname = 127.0.0.1
producer.sinks.r.port = 10101
############################################
# hdfs config
############################################
producer.channels.c1.type = memory
#Timeout in seconds for adding or removing an event
producer.channels.c1.keep-alive= 30
producer.channels.c1.capacity = 10000
producer.channels.c1.transactionCapacity = 10000
producer.channels.c1.byteCapacityBufferPercentage = 20
producer.channels.c1.byteCapacity = 800000 producer.sinks.h.channel = c1 producer.sinks.h.type = hdfs
#目录位置
producer.sinks.h.hdfs.path = hdfs://127.0.0.1/tmp/flume/%Y/%m/%d
#文件前缀
producer.sinks.h.hdfs.filePrefix=nginx-%Y-%m-%d-%H
producer.sinks.h.hdfs.fileType = DataStream
#时间类型必加,不然会报错
producer.sinks.h.hdfs.useLocalTimeStamp = true
producer.sinks.h.hdfs.writeFormat = Text
#hdfs创建多长时间新建文件,0不基于时间
#Number of seconds to wait before rolling current file (0 = never roll based on time interval)
producer.sinks.h.hdfs.rollInterval=0
hdfs多大时新建文件,0不基于文件大小
#File size to trigger roll, in bytes (0: never roll based on file size)
producer.sinks.h.hdfs.rollSize = 0
#hdfs有多少条消息时新建文件,0不基于消息个数
#Number of events written to file before it rolled (0 = never roll based on number of events)
producer.sinks.h.hdfs.rollCount = 0
#批量写入hdfs的个数
#number of events written to file before it is flushed to HDFS
producer.sinks.h.hdfs.batchSize=1000
#flume操作hdfs的线程数(包括新建,写入等)
#Number of threads per HDFS sink for HDFS IO ops (open, write, etc.)
producer.sinks.h.hdfs.threadsPoolSize=15
#操作hdfs超时时间
#Number of milliseconds allowed for HDFS operations, such as open, write, flush, close. This number should be increased if many HDFS timeout operations are occurring.
producer.sinks.h.hdfs.callTimeout=30000
  
hdfs.round false Should the timestamp be rounded down (if true, affects all time based escape sequences except %t)
hdfs.roundValue 1 Rounded down to the highest multiple of this (in the unit configured using hdfs.roundUnit), less than current time.
hdfs.roundUnit second The unit of the round down value - second, minute or hour.

 ############################################
# elasticsearch config
############################################
producer.channels.c2.type = memory
#Timeout in seconds for adding or removing an event
producer.channels.c2.keep-alive= 30
producer.channels.c2.capacity = 10000
producer.channels.c2.transactionCapacity = 10000
producer.channels.c2.byteCapacityBufferPercentage = 20
producer.channels.c2.byteCapacity = 800000 producer.sinks.es.channel = c2 producer.sinks.es.type = org.apache.flume.sink.elasticsearch.ElasticSearchSink
producer.sinks.es.hostNames = 127.0.0.1:9300
#Name of the ElasticSearch cluster to connect to
producer.sinks.es.clusterName = sunxucool
#Number of events to be written per txn.
producer.sinks.es.batchSize = 1000
#The name of the index which the date will be appended to. Example ‘flume’ -> ‘flume-yyyy-MM-dd’
producer.sinks.es.indexName = flume_es
#The type to index the document to, defaults to ‘log’
producer.sinks.es.indexType = test
producer.sinks.es.serializer = org.apache.flume.sink.elasticsearch.ElasticSearchLogStashEventSerializer

flume hdfs一些简单配置记忆的更多相关文章

  1. Flume初入门简单配置与使用

    1.Flume在集群中扮演的角色 Flume.Kafka用来实时进行数据收集,Spark.Storm用来实时处理数据,impala用来实时查询. 2.Flume框架简介 1.1 Flume提供一个分布 ...

  2. Flume + HDFS + Hive日志收集系统

    最近一段时间,负责公司的产品日志埋点与收集工作,搭建了基于Flume+HDFS+Hive日志搜集系统. 一.日志搜集系统架构: 简单画了一下日志搜集系统的架构图,可以看出,flume承担了agent与 ...

  3. flume从kafka读取数据到hdfs中的配置

    #source的名字 agent.sources = kafkaSource # channels的名字,建议按照type来命名 agent.channels = memoryChannel # si ...

  4. [bigdata] 使用Flume hdfs sink, hdfs文件未关闭的问题

    现象: 执行mapreduce任务时失败 通过hadoop fsck -openforwrite命令查看发现有文件没有关闭. [root@com ~]# hadoop fsck -openforwri ...

  5. Flume的安装与配置

    Flume的安装与配置 一.       资源下载 资源地址:http://flume.apache.org/download.html 程序地址:http://apache.fayea.com/fl ...

  6. kafka+flume+HDFS日志采集项目框架

    1,项目图如下: 2, 实现过程 启动HDFS: sbin/start-dfs.sh 启动zookeeper(三台): bin/zkServer.sh start 启动kafka(三台): root@ ...

  7. 使用QJM实现HDFS的HA配置

    使用QJM实现HDFS的HA配置 1.背景 hadoop 2.0.0之前,namenode存在单点故障问题(SPOF,single point of failure),如果主机或进程不可用时,整个集群 ...

  8. 小丁带你走进git世界一-git简单配置

    小丁带你走进git世界一-git简单配置 1.github的简单配置 配置提交代码的信息,例如是谁提交的代码之类的. git config  –global user.name BattleHeaer ...

  9. 以实际的WebGIS例子探讨Nginx的简单配置

    文章版权由作者李晓晖和博客园共有,若转载请于明显处标明出处:http://www.cnblogs.com/naaoveGIS/ 1.背景 以实际项目中的一个例子来详细讲解Nginx中的一般配置,其中涉 ...

随机推荐

  1. Linux下nmon工具安装及nmon analyser的使用

    步骤一:下载nmon及nmon analyser工具 nmon:http://nmon.sourceforge.net/pmwiki.php 根据自己系统的版本下载相应的版本即可 nmon analy ...

  2. discuz功能列表

    导航旁边的+就可以把其加入到常用操作 上 首页 管理中心首页 文件校验,在线成员,管理团队留言.系统信息.开发 团队介绍. 常用操作管理 名称和URL 全局 站点信息 站点名称.网站名称,网站URL. ...

  3. mysql 源代码编绎

    http://blog.chinaunix.net/uid-20723616-id-769326.html https://software.intel.com/zh-cn/blogs/2010/08 ...

  4. java 内存溢出 栈溢出的原因与排查方法

     1. 内存溢出的原因是什么?        内存溢出是由于没被引用的对象(垃圾)过多造成JVM没有及时回收,造成的内存溢出.如果出现这种现象可行代码排查: 一)是否App中的类中和引用变量过多使用了 ...

  5. xcode4.3.2 arc模式下导入非arc的文件 转

    在arc模式下,我们经常会用到非arc的类库,此时我们可以在Compile Sources下对该文件进行编辑加入 -fno-objc-arc   如图中所示,就可以使用非arc的类库了   转:htt ...

  6. 【docker】 docker容器内部安装vi命令

    有时会需要在docker容器内使用vi命令,但是新启动的docker容器内并没有vi命令,那就需要自己安装一个 1.使用命令 apt-get update 2.进行安装 apt-get install ...

  7. MySQL面试题集锦

    1. 如何设计一个高并发的系统 ① 数据库的优化,包括合理的事务隔离级别.SQL语句优化.索引的优化 ② 使用缓存,尽量减少数据库 IO ③ 分布式数据库.分布式缓存 ④ 服务器的负载均衡 2. 锁的 ...

  8. dwr3实现消息精确推送详细步骤

    最近项目中需要用到推送消息,找了很久终于找到一篇不错的文章,方便以后查看就转载了,也分享给大家,希望能帮到有需要的人. 第一.在项目中引入dwr.jar,然后在web.xml中进行配置,配置如下: & ...

  9. 一直困扰设计师多年的Android 单位 dp

    轻松理解Android开发单位DP ,让设计与开发高度匹配,整合了网上各大资料汇总一个通俗易懂的. 一直困扰设计师多年的Android 单位 dp 设计这么多年了,相信很多设计师,一直被DP搞得晕头转 ...

  10. 如何解决Maven速度慢

    注:oschina已失效 Maven 远程仓库 <mirror> <id>ui</id> <mirrorOf>central</mirrorOf& ...