Uploaded image for project: 'Apache Apex Malhar'
  1. Apache Apex Malhar
  2. APEXMALHAR-2508

CacheManager throws exception when the operator receives a shutdown request

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.8.0
    • Component/s: None
    • Labels:
      None

      Description

      CacheManager initializes the Timer (refresher) only if refreshTime is not null. However, in deactivate, before cancelling the timer, there is no null check leading to NullPointerException.
      Solution : Add a null check before cancelling the timer.

        Issue Links

          Activity

          Hide
          ajaygit158 Ajay Gupta added a comment -

          Exception Stack trace :
          java.lang.NullPointerException
          \tat com.datatorrent.lib.db.cache.CacheManager.close(CacheManager.java:181)
          \tat com.datatorrent.contrib.enrich.AbstractEnricher.deactivate(AbstractEnricher.java:196)
          \tat com.datatorrent.stram.engine.Node.deactivate(Node.java:671)
          \tat com.datatorrent.stram.engine.StreamingContainer.teardownNode(StreamingContainer.java:1375)

          Show
          ajaygit158 Ajay Gupta added a comment - Exception Stack trace : java.lang.NullPointerException \tat com.datatorrent.lib.db.cache.CacheManager.close(CacheManager.java:181) \tat com.datatorrent.contrib.enrich.AbstractEnricher.deactivate(AbstractEnricher.java:196) \tat com.datatorrent.stram.engine.Node.deactivate(Node.java:671) \tat com.datatorrent.stram.engine.StreamingContainer.teardownNode(StreamingContainer.java:1375)
          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user ajaygit158 opened a pull request:

          https://github.com/apache/apex-malhar/pull/634

          APEXMALHAR-2508 Add null check while calling cancel() for Timer instance in CacheManager

          @bhupeshchawda Kindly review

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/ajaygit158/apex-malhar APEXMALHAR-2508

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/apex-malhar/pull/634.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #634


          commit 75210e5f355fe4f4ba720b27b222c7137ff8f6ee
          Author: ajaygit158 <ajaygit158@gmail.com>
          Date: 2017-06-14T06:05:06Z

          APEXMALHAR-2508 Add null check while calling cancel() for Timer instance in CacheManager


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user ajaygit158 opened a pull request: https://github.com/apache/apex-malhar/pull/634 APEXMALHAR-2508 Add null check while calling cancel() for Timer instance in CacheManager @bhupeshchawda Kindly review You can merge this pull request into a Git repository by running: $ git pull https://github.com/ajaygit158/apex-malhar APEXMALHAR-2508 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/apex-malhar/pull/634.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #634 commit 75210e5f355fe4f4ba720b27b222c7137ff8f6ee Author: ajaygit158 <ajaygit158@gmail.com> Date: 2017-06-14T06:05:06Z APEXMALHAR-2508 Add null check while calling cancel() for Timer instance in CacheManager
          Hide
          githubbot ASF GitHub Bot added a comment -

          tushargosavi closed pull request #634: APEXMALHAR-2508 Add null check while calling cancel() for Timer instance in CacheManager
          URL: https://github.com/apache/apex-malhar/pull/634

          ----------------------------------------------------------------
          This is an automated message from the Apache Git Service.
          To respond to the message, please log on GitHub and use the
          URL above to go to the specific comment.

          For queries about this service, please contact Infrastructure at:
          users@infra.apache.org

          Show
          githubbot ASF GitHub Bot added a comment - tushargosavi closed pull request #634: APEXMALHAR-2508 Add null check while calling cancel() for Timer instance in CacheManager URL: https://github.com/apache/apex-malhar/pull/634 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org

            People

            • Assignee:
              ajaygit158 Ajay Gupta
              Reporter:
              ajaygit158 Ajay Gupta
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development