Uploaded image for project: 'Apache Tez'
  1. Apache Tez
  2. TEZ-4282

Possible NPE in LocalClient after TEZ-4236

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.10.1
    • None
    • None

    Description

      It can be detected in hive unit tests:

      Caused by: java.lang.NullPointerException
      	at org.apache.tez.client.LocalClient.getAMStatus(LocalClient.java:406)
      	at org.apache.tez.client.TezClient.getAppMasterStatus(TezClient.java:843)
      	at org.apache.tez.client.TezClient.waitTillReady(TezClient.java:977)
      	at org.apache.tez.client.TezClient.preWarm(TezClient.java:924)
      	at org.apache.tez.client.TezClient.preWarm(TezClient.java:879)
      	at org.apache.hadoop.hive.ql.exec.tez.TezSessionState.startSessionAndContainers(TezSessionState.java:546)
      	at org.apache.hadoop.hive.ql.exec.tez.TezSessionState.openInternal(TezSessionState.java:374)
      	at org.apache.hadoop.hive.ql.exec.tez.TezSessionState.open(TezSessionState.java:313)
      	at org.apache.hadoop.hive.ql.exec.tez.TezSessionState.open(TezSessionState.java:220)
      	at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:711)
      

      the problem only affects LocalClient, so not a production-level issue, but unit tests can fail with this problem

      the original getAMStatus in FrameworkClient detected the non-readiness of the AM through the proxy:

          if (proxy == null) {
            return TezAppMasterStatus.INITIALIZING;
          }
          GetAMStatusResponseProto response =
              proxy.getAMStatus(null, GetAMStatusRequestProto.newBuilder().build());
          return DagTypeConverters.convertTezAppMasterStatusFromProto(response.getStatus());
      

      a similar solution should go to LocalClient, and only if isLocalWithoutNetwork is on

          if (clientHandler == null){
            return TezAppMasterStatus.INITIALIZING;
          }
          return clientHandler.getTezAppMasterStatus();
      

      Attachments

        Issue Links

          Activity

            People

              abstractdog László Bodor
              abstractdog László Bodor
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m