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

NPE getting application report with a null appId

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.7.1
    • 2.8.0, 3.0.0-alpha1
    • client
    • None

    Description

      If you accidentally pass in a null appId to get application report, you get an NPE back. This is arguably as intended, except that maybe a guard statement could report this in such a way as to make it easy for callers to track down the cause.

      java.lang.NullPointerException: java.lang.NullPointerException
      org.apache.hadoop.ipc.RemoteException(java.lang.NullPointerException): java.lang.NullPointerException
      	at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333)
      	at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:988)
      	at org.apache.hadoop.yarn.server.resourcemanager.ClientRMService.getApplicationReport(ClientRMService.java:243)
      	at org.apache.hadoop.yarn.api.impl.pb.service.ApplicationClientProtocolPBServiceImpl.getApplicationReport(ApplicationClientProtocolPBServiceImpl.java:120)
      	at org.apache.hadoop.yarn.proto.ApplicationClientProtocol$ApplicationClientProtocolService$2.callBlockingMethod(ApplicationClientProtocol.java:241)
      	at org.apache.hadoop.ipc.ProtobufRpcEngine$Server$ProtoBufRpcInvoker.call(ProtobufRpcEngine.java:585)
      	at org.apache.hadoop.ipc.RPC$Server.call(RPC.java:928)
      	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2048)
      	at org.apache.hadoop.ipc.Server$Handler$1.run(Server.java:2044)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at javax.security.auth.Subject.doAs(Subject.java:415)
      	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1491)
      	at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2042)
      
      	at org.apache.hadoop.ipc.Client.call(Client.java:1347)
      	at org.apache.hadoop.ipc.Client.call(Client.java:1300)
      	at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:206)
      	at com.sun.proxy.$Proxy75.getApplicationReport(Unknown Source)
      	at org.apache.hadoop.yarn.api.impl.pb.client.ApplicationClientProtocolPBClientImpl.getApplicationReport(ApplicationClientProtocolPBClientImpl.java:137)
      	... 28 more
      

      Attachments

        1. YARN-1556.patch
          3 kB
          Weiwei Yang

        Activity

          People

            cheersyang Weiwei Yang
            stevel@apache.org Steve Loughran
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: