빅데이터 3

Flume Spooldir Source -> Avro Sink -> Avro Source -> Kafka Sink 설정

- 개요 A, B 서버가 있고, A서버는 특정 디렉토리를 Polling하여 B서버에 전송하고, B서버는 A서버가 보낸 데이터를 Kafka로 전송 1. Spooldir Source -> Avro Sink # Components Agent.sources = spool_source Agent.channels = memory_channel Agent.sinks = avro_sink # Spool Source Agent.sources.spool_source.type = spooldir Agent.sources.spool_source.deserializer = org.apache.flume.sink.solr.morphline.BlobDeserializer$Builder Agent.sources.spool_sourc..

개발/Apache Flume 2020.10.28

Flume Spooldir 멈춤 현상

- 현상 : Flume 프로세스 자체는 동작중이라고 표시되지만 spooling 중인 폴더에서 파일이 delete 혹은 complete 처리 되지 않는 현상 - 로그 : $FLUME_HOME/logs/flume.log를 확인해보면 java.lang.IllegalStateException: File has changed size since being read 가 출력되고, spooling 하는 thread 로그가 더이상 출력되지 않음 - 원인 : 파일을 쓰는 프로그램과 Flume이 동시에 동작하면서, Flume이 파일을 spool 하는 도중에 파일 크기가 변경되어 spool thread가 중지됨 - 해결 (flume.apache.org/FlumeUserGuide.html#spooling-directory-s..

개발/Apache Flume 2020.10.28