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

File channel throws NullPointerException if a header value is null

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.0
    • Component/s: File Channel
    • Labels:
      None

      Description

      File channel throws NullPointerException if a header value is null.
      If this is intended, it should be reported correctly in the logs.

      Sample trace:

      org.apache.flume.ChannelException: Unable to put batch on required channel: FileChannel chan

      { dataDirs: [/var/lib/ingestion-csv/chan/data] }

      at org.apache.flume.channel.ChannelProcessor.processEventBatch(ChannelProcessor.java:200)
      at org.apache.flume.source.SpoolDirectorySource$SpoolDirectoryRunnable.run(SpoolDirectorySource.java:236)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NullPointerException
      at org.apache.flume.channel.file.proto.ProtosFactory$FlumeEventHeader$Builder.setValue(ProtosFactory.java:7415)
      at org.apache.flume.channel.file.Put.writeProtos(Put.java:85)
      at org.apache.flume.channel.file.TransactionEventRecord.toByteBuffer(TransactionEventRecord.java:174)
      at org.apache.flume.channel.file.Log.put(Log.java:622)
      at org.apache.flume.channel.file.FileChannel$FileBackedTransaction.doPut(FileChannel.java:469)
      at org.apache.flume.channel.BasicTransactionSemantics.put(BasicTransactionSemantics.java:93)
      at org.apache.flume.channel.BasicChannelSemantics.put(BasicChannelSemantics.java:80)
      at org.apache.flume.channel.ChannelProcessor.processEventBatch(ChannelProcessor.java:189)

        Attachments

        1. FLUME-2620.patch
          3 kB
          Neerja Khattar
        2. FLUME-2620.patch
          1 kB
          Neerja Khattar
        3. FLUME-2620-0.patch
          8 kB
          Neerja Khattar
        4. FLUME-2620-1.patch
          9 kB
          Neerja Khattar
        5. FLUME-2620-2.patch
          8 kB
          Neerja Khattar
        6. FLUME-2620-3.patch
          9 kB
          Neerja Khattar
        7. FLUME-2620-4.patch
          13 kB
          Neerja Khattar
        8. FLUME-2620-5.patch
          10 kB
          Marcell Hegedus

          Activity

            People

            • Assignee:
              marcellhegedus Marcell Hegedus
              Reporter:
              smolav Santiago M. Mola
            • Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: