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

Closing KafkaCheckpointManager causes NPE

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment