private void reset() {
      if (chunk != null) {
        chunkedInput = new HttpChunkedInput(new RepeatedBytesInput());
        request = new DefaultHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.POST, path);
        HttpUtil.setContentLength(request, totalSize);
        request.headers().add(RestUtils.Headers.BLOB_SIZE, totalSize);
        request.headers().add(RestUtils.Headers.SERVICE_ID, serviceId);
        request.headers().add(RestUtils.Headers.AMBRY_CONTENT_TYPE, "application/octet-stream");
        if (targetAccountName != null && !targetAccountName.isEmpty()) {
          request.headers().add(RestUtils.Headers.TARGET_ACCOUNT_NAME, targetAccountName);
        }
        if (targetContainerName != null && !targetContainerName.isEmpty() ) {
          request.headers().add(RestUtils.Headers.TARGET_CONTAINER_NAME, targetContainerName);
        }
        if (ttl != null && !ttl.isEmpty()) {
          request.headers().add(RestUtils.Headers.TTL, ttl);
        }
      } else {
        if (pathList == null) {
          request = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, path);
        } else {
          request = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET,
              pathList.get(counter.getAndIncrement() % pathList.size()));
        }
      }
      for (Pair<String, String> headerNameValue : customHeaders) {
        request.headers().add(headerNameValue.getFirst(), headerNameValue.getSecond());
      }
      chunksReceived = 0;
      sizeReceived = 0;
      lastChunkReceiveTime = 0;
      requestStartTime = System.currentTimeMillis();
      response = null;
    }
Resets all state in preparation for the next request-response.
ambry-tools/src/main/java/com/github/ambry/tools/perf/rest/NettyPerfClient.java