public boolean hasJobs() {
		synchronized (lock) {
			return !(pendingJobs.isEmpty() && runningJobs.isEmpty());
		}
	}
Checks if there is any pending jobs.

@return true, if pending jobs exist
yarn/yarn/custom-amservice/src/main/java/org/springframework/yarn/examples/CustomAppmaster.java