[ 
https://issues.apache.org/jira/browse/TEZ-4282?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

László Bodor updated TEZ-4282:
------------------------------
    Description: 
It can be detected in hive unit tests:
{code}
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)
{code}

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:
{code}
    if (proxy == null) {
      return TezAppMasterStatus.INITIALIZING;
    }
    GetAMStatusResponseProto response =
        proxy.getAMStatus(null, GetAMStatusRequestProto.newBuilder().build());
    return 
DagTypeConverters.convertTezAppMasterStatusFromProto(response.getStatus());
{code}

a similar solution should go to LocalClient, and only if isLocalWithoutNetwork 
is on
{code}
    if (clientHandler == null){
      return TezAppMasterStatus.INITIALIZING;
    }
    return clientHandler.getTezAppMasterStatus();
{code}

  was:
It can be detected in hive unit tests:
{code}
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)
{code}

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:
{code}
    if (proxy == null) {
      return TezAppMasterStatus.INITIALIZING;
    }
    GetAMStatusResponseProto response =
        proxy.getAMStatus(null, GetAMStatusRequestProto.newBuilder().build());
    return 
DagTypeConverters.convertTezAppMasterStatusFromProto(response.getStatus());
{code}

a similar solution should go to LocalClient:
{code}
    if (clientHandler == null){
      return TezAppMasterStatus.INITIALIZING;
    }
    return clientHandler.getTezAppMasterStatus();
{code}


> Possible NPE in LocalClient after TEZ-4136
> ------------------------------------------
>
>                 Key: TEZ-4282
>                 URL: https://issues.apache.org/jira/browse/TEZ-4282
>             Project: Apache Tez
>          Issue Type: Bug
>            Reporter: László Bodor
>            Assignee: László Bodor
>            Priority: Major
>
> It can be detected in hive unit tests:
> {code}
> 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)
> {code}
> 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:
> {code}
>     if (proxy == null) {
>       return TezAppMasterStatus.INITIALIZING;
>     }
>     GetAMStatusResponseProto response =
>         proxy.getAMStatus(null, GetAMStatusRequestProto.newBuilder().build());
>     return 
> DagTypeConverters.convertTezAppMasterStatusFromProto(response.getStatus());
> {code}
> a similar solution should go to LocalClient, and only if 
> isLocalWithoutNetwork is on
> {code}
>     if (clientHandler == null){
>       return TezAppMasterStatus.INITIALIZING;
>     }
>     return clientHandler.getTezAppMasterStatus();
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to