9aman commented on code in PR #14920: URL: https://github.com/apache/pinot/pull/14920#discussion_r1940790579
########## pinot-common/src/main/java/org/apache/pinot/common/utils/FileUploadDownloadClient.java: ########## @@ -1274,6 +1275,47 @@ public File downloadUntarFileStreamed(URI uri, File dest, AuthProvider authProvi httpHeaders, maxStreamRateInByte); } + /** + * Invokes the server's reIngestSegment API via a POST request with JSON payload, + * using Simple HTTP APIs. + * + * POST http://[serverURL]/reIngestSegment + * { + * "tableNameWithType": [tableName], + * "segmentName": [segmentName] + * } + */ + public void triggerReIngestion(String serverHostPort, String tableNameWithType, String segmentName) + throws IOException, URISyntaxException, HttpErrorStatusException { + String scheme = HTTP; + if (serverHostPort.contains(HTTPS)) { + scheme = HTTPS; + serverHostPort = serverHostPort.replace(HTTPS + "://", ""); + } else if (serverHostPort.contains(HTTP)) { Review Comment: I think it's better to update the tests than put a condition here. Not sure whether we will run into this. Seems fine for now though. -- 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