2016-06-09 2 views
0

kafka (결국 다른 인스턴스에서 실행중인 kafka를 사용합니다)에서 hdfs로 데이터를 보내려고합니다. hdfs로 데이터를 가져 오려면 flume이나 일종의 섭취 프로토콜이 필요하다고 생각합니다. 그래서 우리는 cloudera의 flume service와 hdfs를 사용하고 있습니다.flush가있는 hdfs sink에 kafka 소스를 디버깅하는 데 도움이 필요합니다.

이것은 내 flume-conf 파일입니다. 다른 conf 파일이 비어 있습니다.

tier1.sources=source1 
tier1.channels=channel1 
tier1.sinks=sink1 

tier1.sources.source1.type=org.apache.flume.source.kafka.KafkaSource 
tier1.sources.source1.zookeeperConnect=localhost:2181 
tier1.sources.source1.topic=test 
tier1.sources.source1.groupId=flume 
tier1.sources.source1.channels=channel1 
tier1.sources.source1.interceptors=i1 
tier1.sources.source1.interceptors.i1.type=timestamp 
tier1.sources.source1.kafka.consumer.timeout.ms=100 

tier1.channels.channel1.type=memory 
tier1.channels.channel1.capacity=10000 
tier1.channels.channel1.transactionCapacity=1000 

tier1.sinks.sink1.type=hdfs 
tier1.sinks.sink1.hdfs.path=/tmp/kafka/test/data 
tier1.sinks.sink1.hdfs.rollInterval=5 
tier1.sinks.sink1.hdfs.rollSize=0 
tier1.sinks.sink1.hdfs.rollCount=0 
tier1.sinks.sink1.hdfs.fileType=DataStream 

kafka 소비자를 시작하면 kafka 제작자가 localhost : 2181에서 메시지를받을 수 있습니다. 그러나 나는 수로에서 어떤 실수도 보지 않으며 아무것도 hdfs에 들어 가지 않습니다. 또한 로그 파일을 찾을 수 없습니다.

이것은 에이전트를 시작하는 방법입니다.

flume-ng agent --conf /opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/flume-ng/conf --conf-file flume-conf --name agent1 -Dflume.root.logger=DEBUG,INFO,console 

도와주세요.

답변

0

수정 됨.

는 tier1

을 --name하는 agent1 --name을 변경해야
관련 문제