[ https://issues.apache.org/jira/browse/FLUME-2897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15216136#comment-15216136 ]
Jarek Jarcec Cecho commented on FLUME-2897: ------------------------------------------- Thanks [~mpercy]. I've quickly looked into other Sinks to see how they are handling this and both [AvroSink|https://github.com/apache/flume/blob/trunk/flume-ng-core/src/main/java/org/apache/flume/sink/AbstractRpcSink.java#L336] and [HdfsSink|https://github.com/apache/flume/blob/trunk/flume-ng-sinks/flume-hdfs-sink/src/main/java/org/apache/flume/sink/hdfs/HDFSEventSink.java#L368] are using the idiom that you've mentioned. Some of the newer sinks ([KafkaSink|https://github.com/apache/flume/blob/trunk/flume-ng-sinks/flume-ng-kafka-sink/src/main/java/org/apache/flume/sink/kafka/KafkaSink.java#L83]) are getting the transaction inside the {{try-catch}}, but then they are properly guarding the transaction object against being {{null}}. This seems a bit simpler, so I'm +1. > AsyncHBase sink NPE when Channel.getTransaction() fails > ------------------------------------------------------- > > Key: FLUME-2897 > URL: https://issues.apache.org/jira/browse/FLUME-2897 > Project: Flume > Issue Type: Bug > Components: Sinks+Sources > Affects Versions: v1.6.0 > Reporter: Mike Percy > Assignee: Mike Percy > Attachments: FLUME-2897-1.patch > > > There is a possibility for a NPE in the AsyncHBaseSink when a channel > getTransaction() call fails. This is possible when the FileChannel is out of > disk space. > Patch forthcoming. -- This message was sent by Atlassian JIRA (v6.3.4#6332)