@Override
  public FileCopyGetMetaDataResponse execute() throws Exception {
    final FileCopyGetMetaDataRequest request = new FileCopyGetMetaDataRequest(
        FileCopyGetMetaDataRequest.FILE_METADATA_REQUEST_VERSION_V_1, fileCopyInfo.getCorrelationId(),
        fileCopyInfo.getClientId(), fileCopyInfo.getSourceReplicaId().getPartitionId(),
        fileCopyInfo.getSourceReplicaId().getDataNodeId().getHostname());

    ConnectedChannel connectedChannel = getChannel(fileCopyInfo.getTargetReplicaId().getDataNodeId());

    logger.info("Sending FileCopyGetMetaDataRequest: {}", request);
    long startTimeMs = System.currentTimeMillis();
    ChannelOutput channelOutput = connectedChannel.sendAndReceive(request);
    FileCopyGetMetaDataResponse response = FileCopyGetMetaDataResponse.readFrom(channelOutput.getInputStream());
    logger.info("Received FileCopyGetMetaDataResponse in {} ms", System.currentTimeMillis() - startTimeMs);

    return response;
  }
The execute method can be used with {@link OperationRetryHandler#executeWithRetry} to send the request to the
target replica and honor a retry policy.
@return The response received from the target replica of type {@link FileCopyGetMetaDataResponse}.
@throws IOException
@throws ConnectionPoolTimeoutException
@throws InterruptedException
ambry-file-transfer/src/main/java/com/github/ambry/filetransfer/workflow/GetMetadataWorkflow.java