public int numPendingRequests() {
    synchronized (lock) {
      return requestsQueue.size();
    }
  }
Returns the number of pending SamzaResource requests in the queue.
@return the number of pending requests
samza-core/src/main/java/org/apache/samza/clustermanager/ResourceRequestState.java