[ https://issues.apache.org/jira/browse/FLUME-3044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
dengkai updated FLUME-3044: --------------------------- Description: There are several method call in kafka sink with no timeout arguments, in some cases, kafka sink will await forever if no interruption. For example, case 1 : When we stop kafka sink, it will call producer.close() without timeout arguement. This will cause another close method in producer with timeout arguement as (Long.MAX_VALUE, TimeUnit.MILLISECONDS). Then it will wait producer's IOThread exited, if the IOThread can't exit normally, kafka sink will block all the time and there is no effect of kill -TERM. case 2 : case 3 : When an odd exception happened such as Correlation ID does not match in Kafka Producer Sender thread, the sender will lost this request. If we call producer.flush(), there is a await() without timeout arguement, kafka sink will block all the time except restart it. was: There are several method call in kafka sink with no timeout arguments, in some cases, kafka sink will await forever if no interruption. For example, case 1 : When we stop kafka sink, it will call producer.close() without timeout arguement. This will cause another close method in producer with timeout arguement as Long.MAX_VALUE, TimeUnit.MILLISECONDS case 2 : case 3 : When an odd exception happened such as Correlation ID does not match in Kafka Producer Sender thread, the sender will lost this request. If we call producer.flush(), there is a await() without timeout arguement, kafka sink will block all the time except restart it. > KafkaSink should avoid to call method without timeout argument > -------------------------------------------------------------- > > Key: FLUME-3044 > URL: https://issues.apache.org/jira/browse/FLUME-3044 > Project: Flume > Issue Type: Improvement > Reporter: dengkai > Assignee: dengkai > > There are several method call in kafka sink with no timeout arguments, in > some cases, kafka sink will await forever if no interruption. > For example, > case 1 : When we stop kafka sink, it will call producer.close() without > timeout arguement. This will cause another close method in producer with > timeout arguement as (Long.MAX_VALUE, TimeUnit.MILLISECONDS). Then it will > wait producer's IOThread exited, if the IOThread can't exit normally, kafka > sink will block all the time and there is no effect of kill -TERM. > case 2 : > case 3 : When an odd exception happened such as Correlation ID does not match > in Kafka Producer Sender thread, the sender will lost this request. If we > call producer.flush(), there is a await() without timeout arguement, kafka > sink will block all the time except restart it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)