private PutChunk getChunkInState(ChunkState state) {
    PutChunk chunkToReturn = null;
    for (PutChunk chunk : putChunks) {
      if (chunk.state == state) {
        chunkToReturn = chunk;
        break;
      }
    }
    return chunkToReturn;
  }
Get the PutChunk that is in specified state. Note that if there are multiple chunks in the specified state, this
method will return the first one encountered.
@return the PutChunk that is in the specified state; null if no PutChunk is in the specified state.
ambry-router/src/main/java/com/github/ambry/router/PutOperation.java