code: public List<ResourceRequest> getWantedResources() {
      List<ResourceRequest> wanted = new ArrayList<ResourceRequest>();
      synchronized(lockObject) {
        for (Integer requestId:
          setDifference(requestMap.keySet(), requestedResources.keySet())) {
          ResourceRequest req = requestMap.get(requestId);
          LOG.info("Filing request for resource " + requestId);
          requestedResources.put(requestId, req);
          wanted.add(req);
        }
      }
      return wanted;
    }
docs: Find what new requests need to be sent by finding out resources needed
  by tasks but not sent to Cluster Manager.
  @return