Jackie-Jiang commented on code in PR #14508:
URL: https://github.com/apache/pinot/pull/14508#discussion_r1852661723


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java:
##########
@@ -351,6 +352,11 @@ private SuccessResponse uploadSegment(@Nullable String 
tableName, TableType tabl
           ? TableNameBuilder.OFFLINE.tableNameWithType(rawTableName)
           : TableNameBuilder.REALTIME.tableNameWithType(rawTableName);
 
+      if 
(UploadedRealtimeSegmentName.isUploadedRealtimeSegmentName(segmentName) && 
tableType != TableType.REALTIME) {
+        throw new ControllerApplicationException(LOGGER,
+            "isUploadedRealtimeSegmentName is only allowed for realtime 
table", Response.Status.BAD_REQUEST);

Review Comment:
   This message is not user friendly. Suggest something like `Cannot upload 
segment: <segmentName> to OFFLINE table as this format is reserved for uploaded 
real-time segment`



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

To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to