Uploaded image for project: 'Samza'
  1. Samza
  2. SAMZA-193

Closing KafkaCheckpointManager causes NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.6.0
    • 0.7.0
    • kafka

    Description

      If you close a disconnected KafkaCheckpointManager, you get an NPE. This is because the Kafka producer is null when it's not connected.

      Exception in thread "ThreadJob" java.lang.NullPointerException
          at org.apache.samza.checkpoint.kafka.KafkaCheckpointManager.stop(KafkaCheckpointManager.scala:215)
          at org.apache.samza.container.SamzaContainer.shutdownCheckpoints(SamzaContainer.scala:655)
          at org.apache.samza.container.SamzaContainer.run(SamzaContainer.scala:510)
          at org.apache.samza.job.local.ThreadJob$$anon$1.run(ThreadJob.scala:42)
      

      We just need to add an if statement here.

      Attachments

        1. SAMZA-193-v2.patch
          0.7 kB
          Neha Narkhede

        Activity

          People

            Unassigned Unassigned
            criccomini Chris Riccomini
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: