zoukankan      html  css  js  c++  java
  • flume 读取tcp写到hdfs

    # Please paste flume.conf here. Example:
    # Sources, channels, and sinks are defined per
    # agent name, in this case 'tier1'.
    tier1.sources  = source1
    tier1.channels = channel1
    tier1.sinks    = sink1
    
    
    # For each source, channel, and sink, set
    # standard properties.
    tier1.sources.source1.type     = syslogtcp
    tier1.sources.source1.bind     = 127.0.0.1
    tier1.sources.source1.port     = 9999
    tier1.sources.source1.channels = channel1
    tier1.channels.channel1.type   = memory
    
    tier1.sinks.sink1.channel= channel1
    tier1.sinks.sink1.type=hdfs  
    tier1.sinks.sink1.hdfs.path=hdfs://ha0:8020/flume/events  
    tier1.sinks.sink1.hdfs.fileType=DataStream  
    tier1.sinks.sink1.hdfs.writeFormat=Text  
    tier1.sinks.sink1.hdfs.rollInterval=0  
    tier1.sinks.sink1.hdfs.rollSize=1024 
    tier1.sinks.sink1.hdfs.rollCount=0  
    tier1.sinks.sink1.hdfs.idleTimeout=60  
    
    # Other properties are specific to each type of
    # source, channel, or sink. In this case, we
    # specify the capacity of the memory channel.
    tier1.channels.channel1.capacity = 100

    测试:
    nc 127.0.0.1 9999
    nc -l 9999

  • 相关阅读:
    openmp
    opencv 读写矩阵
    string to const char*
    c++ string to number
    HDU 1520 Anniversary Party
    ZOJ 1003 Crashing Balloon
    HDU 4171 Paper Route
    ZOJ 2067 White Rectangles
    TOJ 1690 Cow Sorting (置换群)
    TOJ 2814 Light Bulb
  • 原文地址:https://www.cnblogs.com/ggzone/p/5222563.html
Copyright © 2011-2022 走看看