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

Raghav Aggarwal updated TEZ-4686:
---------------------------------
    Description: 
Stacktrace:
{code:java}
2026-02-15 20:50:20,609 INFO zookeeper.ZkAMRegistryClient: AM registered with 
data: {hostName=cb86f81d582a, externalId=tez-session-, hostIp=172.17.0.2, 
port=10001, computeName=default-compute, appId=application_1769280834537_0000}. 
Notifying listeners.2026-02-15 20:50:20,672 INFO zookeeper.ZooKeeper: Session: 
0x100040757d70034 closed2026-02-15 20:50:20,672 INFO zookeeper.ClientCnxn: 
EventThread shut down for session: 0x100040757d70034Exception in thread "main" 
java.lang.NullPointerException: Cannot invoke 
"org.apache.tez.client.registry.AMRecord.getApplicationId()" because 
"this.amRecord" is null     at 
org.apache.tez.client.registry.zookeeper.ZkFrameworkClient.createApplication(ZkFrameworkClient.java:114)
     at org.apache.tez.client.TezClient.createApplication(TezClient.java:1103)  
     at org.apache.tez.client.TezClient.start(TezClient.java:399) {code}
 

I have written a standalone tez job for word count and configured to use 
zookeeper mode. The stacktrace is observed when running that program. The 
similar stacktrace is observed when using tez(master) with hive(master). Will 
attach the stacktraces, logs in attachment.

 

NOTE: Based on the javadoc 
[https://github.com/apache/tez/blob/4632058795de8f871504601d5f2992f311be792a/tez-api/src/main/java/org/apache/tez/client/registry/zookeeper/ZkFrameworkClient.java#L91]
 the stacktrace code path is defying the hidden assumption.

  was:
Stacktrace:
{code:java}
2026-02-15 20:50:20,609 INFO zookeeper.ZkAMRegistryClient: AM registered with 
data: {hostName=cb86f81d582a, externalId=tez-session-, hostIp=172.17.0.2, 
port=10001, computeName=default-compute, appId=application_1769280834537_0000}. 
Notifying listeners.2026-02-15 20:50:20,672 INFO zookeeper.ZooKeeper: Session: 
0x100040757d70034 closed2026-02-15 20:50:20,672 INFO zookeeper.ClientCnxn: 
EventThread shut down for session: 0x100040757d70034Exception in thread "main" 
java.lang.NullPointerException: Cannot invoke 
"org.apache.tez.client.registry.AMRecord.getApplicationId()" because 
"this.amRecord" is null     at 
org.apache.tez.client.registry.zookeeper.ZkFrameworkClient.createApplication(ZkFrameworkClient.java:114)
     at org.apache.tez.client.TezClient.createApplication(TezClient.java:1103)  
     at org.apache.tez.client.TezClient.start(TezClient.java:399) {code}


> NPE when tez-client tries to connect to AM via ZK Mode
> ------------------------------------------------------
>
>                 Key: TEZ-4686
>                 URL: https://issues.apache.org/jira/browse/TEZ-4686
>             Project: Apache Tez
>          Issue Type: Bug
>            Reporter: Raghav Aggarwal
>            Assignee: Raghav Aggarwal
>            Priority: Major
>
> Stacktrace:
> {code:java}
> 2026-02-15 20:50:20,609 INFO zookeeper.ZkAMRegistryClient: AM registered with 
> data: {hostName=cb86f81d582a, externalId=tez-session-, hostIp=172.17.0.2, 
> port=10001, computeName=default-compute, 
> appId=application_1769280834537_0000}. Notifying listeners.2026-02-15 
> 20:50:20,672 INFO zookeeper.ZooKeeper: Session: 0x100040757d70034 
> closed2026-02-15 20:50:20,672 INFO zookeeper.ClientCnxn: EventThread shut 
> down for session: 0x100040757d70034Exception in thread "main" 
> java.lang.NullPointerException: Cannot invoke 
> "org.apache.tez.client.registry.AMRecord.getApplicationId()" because 
> "this.amRecord" is null   at 
> org.apache.tez.client.registry.zookeeper.ZkFrameworkClient.createApplication(ZkFrameworkClient.java:114)
>      at 
> org.apache.tez.client.TezClient.createApplication(TezClient.java:1103)       
> at org.apache.tez.client.TezClient.start(TezClient.java:399) {code}
>  
> I have written a standalone tez job for word count and configured to use 
> zookeeper mode. The stacktrace is observed when running that program. The 
> similar stacktrace is observed when using tez(master) with hive(master). Will 
> attach the stacktraces, logs in attachment.
>  
> NOTE: Based on the javadoc 
> [https://github.com/apache/tez/blob/4632058795de8f871504601d5f2992f311be792a/tez-api/src/main/java/org/apache/tez/client/registry/zookeeper/ZkFrameworkClient.java#L91]
>  the stacktrace code path is defying the hidden assumption.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to