@Override
    public ReturnCode canTakeOperation(HRegionLocation loc, long heapSizeOfRow) {
      RegionInfo regionInfo = loc.getRegion();
      if (regionsIncluded.contains(regionInfo)) {
        // We already know what to do with this region.
        return ReturnCode.INCLUDE;
      }
      AtomicInteger regionCnt = taskCounterPerRegion.get(loc.getRegion().getRegionName());
      if (regionCnt != null && regionCnt.get() >= maxConcurrentTasksPerRegion) {
        // Too many tasks on this region already.
        return ReturnCode.SKIP;
      }
      int newServers =
        serversIncluded.size() + (serversIncluded.contains(loc.getServerName()) ? 0 : 1);
      if ((newServers + tasksInProgress.get()) > maxTotalConcurrentTasks) {
        // Too many tasks.
        return ReturnCode.SKIP;
      }
      AtomicInteger serverCnt = taskCounterPerServer.get(loc.getServerName());
      if (serverCnt != null && serverCnt.get() >= maxConcurrentTasksPerServer) {
        // Too many tasks for this individual server
        return ReturnCode.SKIP;
      }
      return ReturnCode.INCLUDE;
    }
1) check the regions is allowed. 2) check the concurrent tasks for regions. 3) check the
total concurrent tasks. 4) check the concurrent tasks for server.
@param loc           the destination of data
@param heapSizeOfRow the data size
@return either Include {@link RequestController.ReturnCode} or skip
        {@link RequestController.ReturnCode}
hbase-client/src/main/java/org/apache/hadoop/hbase/client/SimpleRequestController.java