code: public synchronized void removeJob(JobInProgress job) {
      if (getPool(getPoolName(job)).removeJob(job)) {
        return;
      }
  
      // Job wasn't found in this pool.  Search for the job in all the pools
      // (the pool may have been created after the job started).
      for (Pool pool : getPools()) {
        if (pool.removeJob(job)) {
          LOG.info("Removed job " + job.jobId + " from pool " + pool.getName() +
              " instead of pool " + getPoolName(job));
          return;
        }
      }
  
      LOG.error("removeJob: Couldn't find job " +
          job.jobId + " in any pool, should have been in pool " +
          getPoolName(job));
    }
docs: Remove a job