FileCopyGetMetaDataResponse getFileCopyGetMetaDataResponse(FileCopyInfo fileCopyInfo) {
    validateIfStoreFileCopyHandlerIsRunning();
    String operationName = GetMetadataWorkflow.GET_METADATA_OPERATION_NAME + "[Partition=" +
        fileCopyInfo.getTargetReplicaId().getPartitionId().getId() + "]";
    FileCopyGetMetaDataResponse metadataResponse = null;

    try {
      metadataResponse = operationRetryHandler.executeWithRetry(
          () -> new GetMetadataWorkflow(connectionPool, fileCopyInfo, config).execute(), operationName);
    } catch (IOException e) {
      logMessageAndThrow(operationName, "IO error while fetching metadata file",
          e, FileCopyHandlerException.FileCopyHandlerErrorCode.FileCopyHandlerGetMetadataApiError);
    } catch (ConnectionPoolTimeoutException e) {
      logMessageAndThrow(operationName, "Connection pool timeout while fetching metadata file",
          e, FileCopyHandlerException.FileCopyHandlerErrorCode.FileCopyHandlerGetMetadataApiError);
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt(); // Preserve interrupt status

      logMessageAndThrow(operationName, "Thread interrupted while fetching metadata file",
          e, FileCopyHandlerException.FileCopyHandlerErrorCode.FileCopyHandlerGetMetadataApiError);
    } catch (RuntimeException e) {
      logMessageAndThrow(operationName, "Unexpected runtime error while fetching metadata file",
          e, FileCopyHandlerException.FileCopyHandlerErrorCode.UnknownError);
    } catch (Exception e) {
      logMessageAndThrow(operationName, "Exception while fetching metadata file",
          e, FileCopyHandlerException.FileCopyHandlerErrorCode.UnknownError);
    }
    validateResponseOrThrow(metadataResponse, operationName);
    logger.info(operationName + ": Fetched metadata for partition: " + fileCopyInfo.getSourceReplicaId().getPartitionId().getId() + " - " + metadataResponse.toString());
    return metadataResponse;
  }
Get the metadata for the file copy.
@param fileCopyInfo the file copy info of type {@link FileCopyInfo}
@return
ambry-file-transfer/src/main/java/com/github/ambry/filetransfer/handler/StoreFileCopyHandler.java