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

Running TestZKRMStateStorePerf with real zookeeper cluster throws NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.9.0, 3.0.0-alpha1
    • None
    • None
    • Reviewed

    Description

      While going throw TestZKRMStateStorePerf class , found that we are not initializing variable TestingServer curatorTestingServer if real zookeeper cluster are passed to utility. But down the line , this variables are used which causes NPE

      I tested by passing program arguments which result in NPE

       
      SLF4J: Class path contains multiple SLF4J bindings.
      SLF4J: Found binding in [jar:file:/C:/Users/r00902292/.m2/repository/org/slf4j/slf4j-log4j12/1.7.10/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      SLF4J: Found binding in [jar:file:/C:/Users/r00902292/.m2/repository/ch/qos/logback/logback-classic/1.1.2/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
      SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
      2016-03-26 14:47:50,937 INFO  [main] recovery.TestZKRMStateStore (TestZKRMStateStorePerf.java:run(119)) - Starting ZKRMStateStorePerf ver.0.1
      java.lang.NullPointerException
      	at org.apache.hadoop.yarn.server.resourcemanager.recovery.TestZKRMStateStorePerf.initStore(TestZKRMStateStorePerf.java:102)
      	at org.apache.hadoop.yarn.server.resourcemanager.recovery.TestZKRMStateStorePerf.run(TestZKRMStateStorePerf.java:156)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
      	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)
      	at org.apache.hadoop.yarn.server.resourcemanager.recovery.TestZKRMStateStorePerf.main(TestZKRMStateStorePerf.java:273)
      

      There are 2 places variable curatorTestingServer used that need to be guarded with null check.

      Attachments

        1. 0001-YARN-4880.patch
          2 kB
          Sunil G

        Activity

          People

            sunilg Sunil G
            rohithsharma Rohith Sharma K S
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: