[HOTFIX] Fix compilation error for Yarn 2.0.*-alpha

This was reported in https://issues.apache.org/jira/browse/SPARK-3445. There are API differences between the 0.23.* and the 2.0.*-alpha branches that are not accounted for when this code was introduced.