flume配置文件example
  flume配置文件example
 
 
 
  #agent1表示代理名称
 
 
 
  agent1.sources=source1
 
 
 
  agent1.sinks=sink1
 
 
 
  agent1.channels=channel1
 
 
 
  #Spooling Directory是监控指定文件夹中新文件的变化,一旦新文件出现,就解析该文件内容,然后写入到channle。写入完成后,标记该文件已完成或者删除该文件。
 
 
 
  #配置source1
 
 
 
  agent1.sources.source1.type=spooldir
 
 
 
  agent1.sources.source1.spoolDir=/root/hmbbs
 
 
 
  agent1.sources.source1.channels=channel1
 
 
 
  agent1.sources.source1.fileHeader = false
 
 
 
  agent1.sources.source1.interceptors = i1
 
 
 
  agent1.sources.source1.interceptors.i1.type = timestamp
 
 
 
  #配置sink1
 
 
 
  agent1.sinks.sink1.type=hdfs
 
 
 
  agent1.sinks.sink1.hdfs.path=hdfs://hadoop0:9000/hmbbs
 
 
 
  agent1.sinks.sink1.hdfs.fileType=DataStream
 
 
 
  agent1.sinks.sink1.hdfs.writeFormat=TEXT
 
 
 
  agent1.sinks.sink1.hdfs.rollInterval=1
 
 
 
  agent1.sinks.sink1.channel=channel1
 
 
 
  agent1.sinks.sink1.hdfs.filePrefix=%Y-%m-%d
 
 
 
  #配置channel1
 
 
 
  agent1.channels.channel1.type=file
 
 
 
   agent1.channels.channel1.checkpointDir=/root/hmbbs_tmp/123
 
 
 
  agent1.channels.channel1.dataDirs=/root/hmbbs_tmp/
 
 
 
                    
                     
                    
                 
                    
                
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号