sajjad-moradi commented on a change in pull request #5617:
URL: https://github.com/apache/incubator-pinot/pull/5617#discussion_r448505771
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java
##########
@@ -303,46 +342,38 @@ private String getZkDownloadURIForSegmentUpload(String
rawTableName, String segm
}
}
- private SegmentMetadata getMetadataForURI(String crypterClassHeader, String
currentSegmentLocationURI,
- File tempEncryptedFile, File tempDecryptedFile, File tempSegmentDir,
String metadataProviderClass)
+ private void downloadSegmentFileFromURI(String currentSegmentLocationURI,
File destFile)
throws Exception {
- SegmentMetadata segmentMetadata;
if (currentSegmentLocationURI == null ||
currentSegmentLocationURI.isEmpty()) {
throw new ControllerApplicationException(LOGGER, "Failed to get
downloadURI, needed for URI upload",
Response.Status.BAD_REQUEST);
}
- LOGGER.info("Downloading segment from {} to {}",
currentSegmentLocationURI, tempEncryptedFile.getAbsolutePath());
- SegmentFetcherFactory.fetchSegmentToLocal(currentSegmentLocationURI,
tempEncryptedFile);
- segmentMetadata = getSegmentMetadata(crypterClassHeader,
tempEncryptedFile, tempDecryptedFile, tempSegmentDir,
- metadataProviderClass);
- return segmentMetadata;
+ LOGGER.info("Downloading segment from {} to {}",
currentSegmentLocationURI, destFile.getAbsolutePath());
Review comment:
I think the same way, but I added the table name to the logs anyways.
For the segment, it is not available here. Segment needs to be downloaded first
and then its name can be retrieved from the segment metadata.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]