chenboat 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_r346523121
 
 

 ##########
 File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadRestletResource.java
 ##########
 @@ -352,10 +352,10 @@ 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.getPath(baseDataDirURI.toString(), 
rawTableName, URIUtils.encode(segmentName));
 
 Review comment:
   So it looks like URIUtils.constructDownloadUrl() is a bit misleading. There 
is a need to fix that method too? At least update its documentation?

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