Jackie-Jiang commented on a change in pull request #4825: Bug Fix: Fix segment 
download url in SegmentZkMetadata.
URL: https://github.com/apache/incubator-pinot/pull/4825#discussion_r346456760
 
 

 ##########
 File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadRestletResource.java
 ##########
 @@ -352,10 +352,11 @@ private String 
getZkDownloadURIForSegmentUpload(FileUploadPathProvider provider,
     if 
(baseDataDirURI.getScheme().equalsIgnoreCase(CommonConstants.Segment.LOCAL_SEGMENT_SCHEME))
 {
       return URIUtils.constructDownloadUrl(provider.getVip(), rawTableName, 
segmentName);
     } else {
-      // Receiving .tar.gz segment upload for pluggable storage
-      LOGGER.info("Using configured data dir {} for segment {} of table {}", 
_controllerConf.getDataDir(), segmentName,
-          rawTableName);
-      return URIUtils.constructDownloadUrl(baseDataDirURI.toString(), 
rawTableName, segmentName);
+      // Receiving .tar.gz segment upload for pluggable storage. Download URI 
is the same as final segment location.
+      String downloadUri = URIUtils.getUri(baseDataDirURI.toString(), 
rawTableName, URIUtils.encode(segmentName)).toString();
+      LOGGER.info("Using configured data dir {} for segment {} of table {}, 
Download URI: {}", _controllerConf.getDataDir(),
 
 Review comment:
   Please revise the log info, the data dir in log is not in sync with the 
behavior.
   Suggest changing it to "Using download URI: {} for segment: {} of table: {}"

----------------------------------------------------------------
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]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to