private PutChunk getChunkToFill() throws RouterException {
    if (chunkToFill == null || !chunkToFill.isBuilding()) {
      chunkToFill = getFreeChunk();
      if (chunkToFill != null) {
        if (chunkCounter == Integer.MAX_VALUE) {
          throw new RouterException("Blob is too large", RouterErrorCode.BlobTooLarge);
        }
        chunkCounter++;
        chunkToFill.prepareForBuilding(chunkCounter);
      }
    }
    return chunkToFill;
  }
Get the chunk to be filled. At most one chunk for an operation will ever be in Building state. If there is such
a chunk, that is returned. If not, if there is a Free chunk, that is returned. If no Free chunks are available
either, then null is returned.
@return the chunk to fill, or null if there are no chunks eligible for filling.
ambry-router/src/main/java/com/github/ambry/router/PutOperation.java