Define the hdp.version parameter in your cluster.
The easiest way of doing this is to add this parameter to the yarn-site.xml configuration file.
- In Ambari, click the Yarn service on the service list on the left, then click Configs to open the configuration page and click the Advanced tab.
- Scroll down the page to find the Custom yarn-site list at the end of page and click Custom yarn-site to show this list.
- Click Add property to open the [Add property] dialog box.
Enter hdp.version=126.96.36.199-8, the version number you found by following Find the hdp.version value to be used and click Add to validate the changes. The hdp.version parameter appears in the Custom yarn-site parameter list.
- Click Save to validate the new configuration and restart the services to implement the hdp.version parameter in the yarn-site.xml file.
- In the Studio, open the Spark Job to be used and click the Run tab to open its view.
Click Spark configuration, then in the view, select the Set hdp.version check box and enter, within double quotation marks, the same version number you have entered in the cluster. In this example, it is 188.8.131.52-8.
This procedure explains only the actions to be performed to solve the HDP version issue for a Spark Job. You need properly configure the other parts of your Job before being able to run it successfully.