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

    换一个文件夹

  • 相关阅读:
    【转载】WinCE编译一二三
    Implement the OEM Power Management on Windows CE
    ubuntu 精简系统
    simple awk tutorial
    debian 安装备份已安装软件包
    awk 简单教程
    Unix Sed Tutorial: Advanced Sed Substitution Examples
    dos修改子文件夹所有文件文件名
    Using Intel MKL with MATLAB Matlab使用多核CPU
    [转]学校的统一订书80%该烧掉——IT推荐书单
  • 原文地址:https://www.cnblogs.com/sunyaxue/p/6600642.html
Copyright © 2011-2022 走看看