Uploaded image for project: 'Flume'
  1. Flume
  2. FLUME-2946

AtomicIncrement List Null CHeck

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.6.0
    • None
    • Sinks+Sources
    • None

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            jayadeepj jayadeepj
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: