[YARN] Improved the check for resource availability within the cluster