zoukankan      html  css  js  c++  java
  • flume source spooldir

    agent.sources = r1
    agent.sinks = k1
    agent.channels = c1
    
    agent.sources.r1.type = spooldir
    agent.sources.r1.spoolDir = /Users/lihu/Desktop/crawla/
    agent.sources.r1.fileHeader = true
    agent.sources.r1.channels = c1
    
    agent.sinks.k1.type = logger
    agent.sinks.k1.channel = c1
    
    agent.channels.c1.type = memory
    agent.channels.c1.capacity = 1000
    agent.channels.c1.transactionCapacity = 100
    
    lihudeMacBook-Pro:flume SunAndLi$  bin/flume-ng agent -c conf -f conf/spooldir --name agent -Dflume.root.logger=INFO,console 
    
    lihudeMacBook-Pro:~ SunAndLi$ echo "iy3" > /Users/lihu/Desktop/crawla/spool_text.log
    
    2017-03-22 16:28:56,816 (SinkRunner-PollingRunner-DefaultSinkProcessor) [INFO - org.apache.flume.sink.LoggerSink.process(LoggerSink.java:95)] Event: { headers:{file=/Users/lihu/Desktop/crawla/spool_text.log} body: 69 79 33                                        iy3 }
    2017-03-22 16:28:56,817 (pool-3-thread-1) [INFO - org.apache.flume.client.avro.ReliableSpoolingFileEventReader.readEvents(ReliableSpoolingFileEventReader.java:324)] Last read took us just up to a file boundary. Rolling to the next file, if there is one.
    2017-03-22 16:28:56,817 (pool-3-thread-1) [INFO - org.apache.flume.client.avro.ReliableSpoolingFileEventReader.rollCurrentFile(ReliableSpoolingFileEventReader.java:433)] Preparing to move file /Users/lihu/Desktop/crawla/spool_text.log to /Users/lihu/Desktop/crawla/spool_text.log.COMPLETED
    

    如果报错类似于  Uncaught exception in SpoolDirectorySource thread. Restart or reconfigure Flume to continue process

    换一个文件夹

  • 相关阅读:
    x240 uefi ubuntu 12.04.4
    配置管理系统和总体变更系统有什么差别与联系
    C#-利用ZPL语言完毕条形码的生成和打印
    Java Web系统经常使用的第三方接口
    C++类型转换
    JAVA实现HTTPserver端
    Java 实现迭代器(Iterator)模式
    tomcat源代码Catalina
    【剑指offer】二叉搜索树转双向链表
    linux下C语言中的flock函数使用方法 .
  • 原文地址:https://www.cnblogs.com/sunyaxue/p/6600642.html
Copyright © 2011-2022 走看看