“bad substitution” error running Spark on Yarn

you can update the hdp.version property through Ambari GUI. below are the steps:

1. Go to ‘Ambari -> YARN -> configs’ and go to ‘Advanced’ tab.

2. scroll down the page to till end, there will find an option to add custom property for yarn-site

3. click on ‘add property’ and enter ‘hdp.version’ and the version value.

4. save the changes and restart the required services. It will deploy the hdp.verion property in yarn-site.xml

these steps worked for me, it should work for you as well πŸ™‚ !