[ https://issues.apache.org/jira/browse/FLUME-2946?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15369040#comment-15369040 ]
jayadeepj commented on FLUME-2946: ---------------------------------- [~mpercy] Yes. We can return empty lists, however it wasn’t obvious (at least to me!) until I looked up the AsynchHBaseSink code. It is likely that the authors of custom serializers will probably find it the hard way after sifting through the error logs. However if you think adding a javadoc for that would suffice, then it is fine with me. > AtomicIncrement List Null CHeck > ------------------------------- > > Key: FLUME-2946 > URL: https://issues.apache.org/jira/browse/FLUME-2946 > Project: Flume > Issue Type: Bug > Components: Sinks+Sources > Affects Versions: v1.6.0 > Reporter: jayadeepj > Priority: Minor > > If I use custom serializer implementing > org.apache.flume.sink.hbase.AsyncHbaseEventSerializer; , without any > AtomicIncrements i.e getIncrements() returning null, I get the below > exception. > 2016-07-06 10:21:34,068 ERROR org.apache.flume.SinkRunner: Unable to deliver > event. Exception follows. > java.lang.NullPointerException > at > org.apache.flume.sink.hbase.AsyncHBaseSink.process(AsyncHBaseSink.java:227) > at > org.apache.flume.sink.DefaultSinkProcessor.process(DefaultSinkProcessor.java:68) > at org.apache.flume.SinkRunner$PollingRunner.run(SinkRunner.java:147) > at java.lang.Thread.run(Thread.java:745) > I guess since Atomic Increments are optional, it should be null checked in > AsyncHBaseSink.java between > “ List<AtomicIncrementRequest> increments = serializer.getIncrements(); > ….. > callbacksExpected.addAndGet(increments.size());” > Custom serializers shouldn’t have to return empty lists -- This message was sent by Atlassian JIRA (v6.3.4#6332)