tez-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Wohlstadter (JIRA)" <j...@apache.org>
Subject [jira] [Created] (TEZ-3874) NPE in TezClientUtils when "yarn.resourcemanager.zk-address" is present in Configuration
Date Tue, 05 Dec 2017 18:49:00 GMT
Eric Wohlstadter created TEZ-3874:

             Summary: NPE in TezClientUtils when "yarn.resourcemanager.zk-address" is present
in Configuration
                 Key: TEZ-3874
                 URL: https://issues.apache.org/jira/browse/TEZ-3874
             Project: Apache Tez
          Issue Type: Bug
    Affects Versions: 0.9.1
            Reporter: Eric Wohlstadter
            Priority: Blocker

"yarn.resourcemanager.zk-address" is deprecated in favor of "hadoop.zk.address" for Hadoop

Configuration base class does't auto-translate the deprecation. Only YarnConfiguration applies
the translation.

In TezClientUtils.createFinalConfProtoForApp, a NPE is throw if "yarn.resourcemanager.zk-address"
is present in the Configuration.

for (Entry<String, String> entry : amConf) {
      PlanKeyValuePair.Builder kvp = PlanKeyValuePair.newBuilder();

Even though Tez is not specifically looking for the deprecated property, {{amConf.get(entry.getKey())}}
will find it during the iteration, if it is in any of the merged xml property resources. 

{{amConf.get(entry.getKey())}} will return null, and {{kvp.setValue(null)}} will trigger NPE.

Suggested solution is to change to: 
YarnConfiguration wrappedConf = new YarnConfiguration(amConf);
for (Entry<String, String> entry : wrappedConf) {
      PlanKeyValuePair.Builder kvp = PlanKeyValuePair.newBuilder();

This message was sent by Atlassian JIRA

View raw message