Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
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();