jackjlli commented on a change in pull request #3856: Check assigned instances 
for uploading new segment
URL: https://github.com/apache/incubator-pinot/pull/3856#discussion_r259215453
 
 

 ##########
 File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadRestletResource.java
 ##########
 @@ -315,12 +317,13 @@ private SuccessResponse uploadSegment(FormDataMultiPart 
multiPart, boolean enabl
               clientAddress);
 
       // Validate segment
-      new SegmentValidator(_pinotHelixResourceManager, _controllerConf, 
_executor, _connectionManager,
-          _controllerMetrics).validateSegment(segmentMetadata, tempSegmentDir);
+      SegmentValidatorResponse segmentValidatorResponse =
+          new SegmentValidator(_pinotHelixResourceManager, _controllerConf, 
_executor, _connectionManager,
 
 Review comment:
   SegmentValidator also depends on other variables like 
`pinotHelixResourceManager`, `executor`, `connectionManager`, etc, which are 
not related to the segment itself. And the logic is in Resource class. I think 
it's best to instantiate one, since the latency of uploading an offline segment 
is acceptable.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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