agent.sources = testSource agent.channels = testChannel agent.sinks = testSink # For each one of the sources, the type is defined agent.sources.testSource.type = syslogtcp agent.sources.testSource.host = 127.0.0.1 agent.sources.testSource.port = 9999 agent.sources.testSource.channels = testChannel # Each sink's type must be defined agent.sinks.testSink.type = logger agent.sinks.testSink.channel = testChannel # Each channel's type is defined. agent.channels.testChannel.type = memory agent.channels.testChannel.capacity = 1000 agent.channels.testChannel.transactionCapacity = 100 |
flume-ng node -n agent -c /home1/irteam/apps/flume/conf -f /home1/irteam/apps/flume/conf/sample-flume-conf.properties -Dflume.root.logger=INFO,console |
<dependency> <groupId>org.apache.flume</groupId> <artifactId>flume-ng-sdk</artifactId> <version>1.4.0</version> <type>jar</type> <scope>compile</scope> </dependency> |
<appender name="flume-appender" class="org.apache.flume.clients.log4jappender.Log4jAppender"> <param name="hostname" value="127.0.01"/> <param name="port" value="9999"/> </appender> <logger name="flume" additivity="false"> <level value="INFO"/> <appender-ref ref="flume-appender"/> </logger> |
@Test public void flume전송_테스트() { Log log = LogFactory.getLog("flume"); log.info("Hello World"); } |
org.apache.flume.FlumeException: Flume append() failed. Exception follows. |
agent.sources = testSource agent.channels = testChannel agent.sinks = testSink # For each one of the sources, the type is defined agent.sources.testSource.type = avro agent.sources.testSource.bind = 127.0.0.1 agent.sources.testSource.port = 9999 agent.sources.testSource.channels = testChannel # Each sink's type must be defined agent.sinks.testSink.type = logger agent.sinks.testSink.channel = testChannel # Each channel's type is defined. agent.channels.testChannel.type = memory agent.channels.testChannel.capacity = 1000 agent.channels.testChannel.transactionCapacity = 100 #size가 작은 경우 sink되는 data가 잘리는 현상이 발생한다. |
'BigData > Flume' 카테고리의 다른 글
Flume RpcClient 사용기 (0) | 2016.01.20 |
---|---|
Custom Sink 만들어보기 (0) | 2015.05.12 |
flume multi sink 설정하기 (0) | 2015.04.14 |