Uploaded image for project: 'Hadoop YARN'
  1. Hadoop YARN
  2. YARN-3919

NPEs' while stopping service after exception during CommonNodeLabelsManager#start

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 2.7.0
    • 2.8.0, 3.0.0-alpha1
    • resourcemanager
    • None
    • Reviewed

    Description

      We get NPE during CommonNodeLabelsManager#serviceStop and AsyncDispatcher#serviceStop if ConnectException on call to CommonNodeLabelsManager#serviceStart occurs.

      2015-07-10 19:39:37,825 WARN main-EventThread org.apache.hadoop.service.AbstractService: When stopping the service org.apache.hadoop.yarn.nodelabels.CommonNodeLabelsManager : java.lang.NullPointerException
      java.lang.NullPointerException
              at org.apache.hadoop.yarn.nodelabels.FileSystemNodeLabelsStore.close(FileSystemNodeLabelsStore.java:99)
              at org.apache.hadoop.yarn.nodelabels.CommonNodeLabelsManager.serviceStop(CommonNodeLabelsManager.java:278)
              at org.apache.hadoop.service.AbstractService.stop(AbstractService.java:221)
              at org.apache.hadoop.service.ServiceOperations.stop(ServiceOperations.java:52)
              at org.apache.hadoop.service.ServiceOperations.stopQuietly(ServiceOperations.java:80)
              at org.apache.hadoop.service.AbstractService.start(AbstractService.java:203)
              at org.apache.hadoop.service.CompositeService.serviceStart(CompositeService.java:120)
              at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$RMActiveServices.serviceStart(ResourceManager.java:588)
              at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193)
              at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.startActiveServices(ResourceManager.java:998)
              at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$1.run(ResourceManager.java:1039)
              at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager$1.run(ResourceManager.java:1035)
      
      java.lang.NullPointerException
              at org.apache.hadoop.yarn.event.AsyncDispatcher.serviceStop(AsyncDispatcher.java:142)
              at org.apache.hadoop.service.AbstractService.stop(AbstractService.java:221)
              at org.apache.hadoop.service.ServiceOperations.stop(ServiceOperations.java:52)
              at org.apache.hadoop.service.ServiceOperations.stopQuietly(ServiceOperations.java:80)
              at org.apache.hadoop.service.CompositeService.stop(CompositeService.java:157)
              at org.apache.hadoop.service.CompositeService.serviceStop(CompositeService.java:131)
              at org.apache.hadoop.service.AbstractService.stop(AbstractService.java:221)
              at org.apache.hadoop.service.ServiceOperations.stop(ServiceOperations.java:52)
              at org.apache.hadoop.service.ServiceOperations.stopQuietly(ServiceOperations.java:80)
      

      These NPEs' fill up the logs. Although, this doesn't cause any functional issue but its a nuisance and we ideally should have null checks in serviceStop.

      Attachments

        1. YARN-3919.01.patch
          1 kB
          Varun Saxena
        2. YARN-3919.02.patch
          2 kB
          Varun Saxena
        3. 0003-YARN-3919.patch
          2 kB
          Rohith Sharma K S

        Activity

          People

            varun_saxena Varun Saxena
            varun_saxena Varun Saxena
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: